From b9acd9a9ef5d168d6591e7dc9d9ddee6b347aab3 Mon Sep 17 00:00:00 2001
From: Nicolas Koehler <nicolas.koehler@cern.ch>
Date: Tue, 22 Dec 2020 15:22:45 +0000
Subject: [PATCH] Rename Trk::SegmentCollection to TrackMuonSegments to avoid
 duplicate (ATLASRECTS-5667)

---
 .../xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h  |  2 +-
 .../python/MuonReconstructionConfig.py        |  2 +-
 .../python/MuonSegmentFindingConfig.py        | 17 ++--
 .../python/MuonTrackBuildingConfig.py         |  2 +-
 .../MuonRecExample/python/MuonStandalone.py   | 15 ++--
 .../share/MuonRecOutputItemList_jobOptions.py |  4 +-
 .../src/MuonSegmentFinderAlg.h                |  4 +-
 .../src/MuonPhysValMonitoringTool.cxx         | 79 ++++++-------------
 .../src/MuonPhysValMonitoringTool.h           | 69 ++++++----------
 .../CscRawDataMonitoring/CSCSegmValAlg.h      |  2 +-
 .../CscRawDataMonitoring/CSCSegmValMonAlg.h   |  3 +-
 .../share/CSCMon_jobOptions.py                |  4 +-
 .../share/CscRawESD_MonitoringOptions.py      |  4 -
 .../src/CSCSegmValMonAlg.cxx                  | 12 +++
 .../MdtRawDataMonitoring/MdtRawDataMonAlg.h   |  3 +-
 .../MdtRawDataMonitoring/MdtRawDataValAlg.h   |  2 +-
 .../src/MdtRawDataMonAlg.cxx                  | 15 +++-
 .../PrimaryDPDMaker/share/DESDM_IDALIGN.py    |  4 +-
 .../PrimaryDPDMaker/share/DESD_DEDX.py        |  4 +-
 .../PrimaryDPDMaker/share/PerfDESDM_MS.py     |  2 +-
 .../PrimaryDPDMaker/share/PerfDPD_AllCells.py |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_EGamma.py   |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_EOverP.py   |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_Jet.py      |  4 +-
 .../share/PerfDPD_PhotonJet.py                |  4 +-
 .../PrimaryDPDMaker/share/PerfDPD_SGLEL.py    |  4 +-
 .../share/PerfDPD_TtbarMuon.py                |  4 +-
 .../share/PhysDPD_HIPs.py                     |  4 +-
 .../src/MuonCombinedInDetExtensionAlg.h       |  7 +-
 .../MuonCombinedReconstructionConfig.py       |  2 +-
 .../python/MuonCombinedAlgs.py                | 21 +----
 .../RecBackgroundAlgs/BeamBackgroundFiller.h  |  4 +-
 .../share/RecBackground_jobOptions.py         |  2 +-
 .../python/HLTMenuConfig/Muon/MuonSetup.py    |  6 +-
 34 files changed, 129 insertions(+), 194 deletions(-)

diff --git a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h
index ed64557d5427..08f850428c44 100644
--- a/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h
+++ b/Event/xAOD/xAODMuonCnv/src/MuonSegmentCnvAlg.h
@@ -36,7 +36,7 @@ namespace xAODMaker {
 
    private:
      // the following segments do NOT contain MuGirl segments
-     SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation{this,"SegmentContainerName","MuonSegments"};
+     SG::ReadHandleKey<Trk::SegmentCollection> m_muonSegmentLocation{this,"SegmentContainerName","TrackMuonSegments"};
      SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_xaodContainerName{this,"xAODContainerName","MuonSegments"};
 
      ToolHandle<xAODMaker::IMuonSegmentConverterTool> m_muonSegmentConverterTool{this,"MuonSegmentConverterTool","Muon::MuonSegmentConverterTool/MuonSegmentConverterTool"};
diff --git a/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py b/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
index 25fb367cb01d..421518f5059f 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
@@ -55,7 +55,7 @@ if __name__=="__main__":
     muon_edm_helper_svc = Muon__MuonEDMHelperSvc("MuonEDMHelperSvc")
     cfg.addService( muon_edm_helper_svc )
 
-    itemsToRecord = ["Trk::SegmentCollection#MuonSegments", "Trk::SegmentCollection#NCB_MuonSegments"]
+    itemsToRecord = ["Trk::SegmentCollection#TrackMuonSegments", "Trk::SegmentCollection#NCB_TrackMuonSegments"]
     itemsToRecord += ["TrackCollection#MuonSpectrometerTracks"] 
     SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord)
     
diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
index ec455944705b..ea0c9e213fc3 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
@@ -610,7 +610,7 @@ def MooSegmentFinderAlgCfg(flags, name = "MuonSegmentMaker",  **kwargs):
     # FIXME - this really shouldn't be set here! 
     kwargs.setdefault('TgcPrepDataContainer', 'TGC_MeasurementsAllBCs' if not flags.Muon.useTGCPriorNextBC and not flags.Muon.useTGCPriorNextBC else 'TGC_Measurements')
         
-    kwargs.setdefault('MuonSegmentOutputLocation', "ThirdChainSegments" if flags.Muon.segmentOrigin=="TruthTracking" else "MuonSegments")
+    kwargs.setdefault('MuonSegmentOutputLocation', "ThirdChainSegments" if flags.Muon.segmentOrigin=="TruthTracking" else "TrackMuonSegments")
 
     moo_segment_finder_alg = MooSegmentFinderAlg( name=name, **kwargs )
     moo_segment_finder_alg.Cardinality=10
@@ -645,7 +645,7 @@ def MooSegmentFinderAlg_NCBCfg(flags, name = "MuonSegmentMaker_NCB", **kwargs):
 
     # Now set other NCB properties
     kwargs.setdefault('MuonPatternCombinationLocation', "NCB_MuonHoughPatternCombinations" )
-    kwargs.setdefault('MuonSegmentOutputLocation', "NCB_MuonSegments" )
+    kwargs.setdefault('MuonSegmentOutputLocation', "NCB_TrackMuonSegments" )
     kwargs.setdefault('UseCSC', flags.Muon.doCSCs)
     kwargs.setdefault('UseMDT', False)
     kwargs.setdefault('UseRPC', False)
@@ -679,7 +679,7 @@ def MuonSegmentFindingCfg(flags, cardinality=1):
     result.merge(acc)
     return result
 
-if __name__=="__main__":                        
+if __name__=="__main__":
     # To run this, do e.g. 
     # python -m MuonConfig.MuonSegmentFindingConfig --run --threads=1
     from MuonConfig.MuonConfigUtils import SetupMuonStandaloneArguments, SetupMuonStandaloneConfigFlags, SetupMuonStandaloneOutput, SetupMuonStandaloneCA
@@ -707,13 +707,13 @@ if __name__=="__main__":
     pps = ProxyProviderSvc()
     ars=AddressRemappingSvc()
     pps.ProviderNames += [ 'AddressRemappingSvc' ]
-    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "MuonSegments", "MuonSegments_old") ]
-    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "MuonSegments_NCB", "MuonSegments_NCB_old") ]
-    
+    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "TrackMuonSegments", "TrackMuonSegments_old") ]
+    ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("Trk::SegmentCollection", "NCB_TrackMuonSegments", "NCB_TrackMuonSegments_old") ]
+
     cfg.addService(pps)
     cfg.addService(ars)
-    
-    itemsToRecord = ["Trk::SegmentCollection#MuonSegments", "Trk::SegmentCollection#NCB_MuonSegments"]
+
+    itemsToRecord = ["Trk::SegmentCollection#TrackMuonSegments", "Trk::SegmentCollection#NCB_TrackMuonSegments"]
     SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord)
 
     # cfg.getService("StoreGateSvc").Dump = True
@@ -727,4 +727,3 @@ if __name__=="__main__":
         if not sc.isSuccess():
             import sys
             sys.exit("Execution failed")
-    
diff --git a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
index c66983c0fca2..3036fb462f03 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonTrackBuildingConfig.py
@@ -527,7 +527,7 @@ def MuonTrackBuildingCfg(flags, name = "MuPatTrackBuilder"):
     track_steering = acc.getPrimary()
     result.merge(acc)
     
-    track_builder = MuPatTrackBuilder(name=name, TrackSteering = track_steering, MuonSegmentCollection="MuonSegments", SpectrometerTrackOutputLocation="MuonSpectrometerTracks" )
+    track_builder = MuPatTrackBuilder(name=name, TrackSteering = track_steering, MuonSegmentCollection="TrackMuonSegments", SpectrometerTrackOutputLocation="MuonSpectrometerTracks" )
 
     result.addEventAlgo( track_builder, primary=True )
     return result
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py
index bed770e06a53..45f35c51658f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonStandalone.py
@@ -66,7 +66,7 @@ def MooSegmentFinderAlg( name="MuonSegmentMaker",**kwargs ):
     kwargs.setdefault("SegmentFinder", getPublicToolClone("MuonSegmentFinder","MooSegmentFinder",
                                                           DoSummary=muonStandaloneFlags.printSummary()))
     kwargs.setdefault("MuonClusterSegmentFinderTool",getPublicTool("MuonClusterSegmentFinder"))
-    kwargs.setdefault("MuonSegmentOutputLocation", "MuonSegments")
+    kwargs.setdefault("MuonSegmentOutputLocation", "TrackMuonSegments")
     kwargs.setdefault("UseCSC", muonRecFlags.doCSCs())
     kwargs.setdefault("UseMDT", muonRecFlags.doMDTs())
     kwargs.setdefault("UseRPC", muonRecFlags.doRPCs())
@@ -94,8 +94,7 @@ def MooSegmentFinderNCBAlg( name="MuonSegmentMaker_NCB",**kwargs ):
                                                                                                  segmentTool = getPublicTool("CscSegmentUtilTool_NCB")) if MuonGeometryFlags.hasCSC() else ""),
                                                          DoMdtSegments=False,DoSegmentCombinations=False,DoSegmentCombinationCleaning=False))
     kwargs.setdefault("MuonPatternCombinationLocation", "NCB_MuonHoughPatternCombinations")
-    kwargs.setdefault("MuonSegmentOutputLocation", "NCB_MuonSegments")
-    kwargs.setdefault("MuonSegmentOutputLocation", "NCB_MuonSegments")
+    kwargs.setdefault("MuonSegmentOutputLocation", "NCB_TrackMuonSegments")
     kwargs.setdefault("UseCSC", muonRecFlags.doCSCs())
     kwargs.setdefault("UseMDT", False)
     kwargs.setdefault("UseRPC", False)
@@ -146,7 +145,7 @@ class MuonStandalone(ConfiguredMuonRec):
         super(MuonStandalone,self).configure(keys)
         if not self.isEnabled(): return
 
-        SegmentLocation = "MuonSegments"
+        SegmentLocation = "TrackMuonSegments"
         if muonStandaloneFlags.segmentOrigin == 'TruthTracking':
             SegmentLocation = "ThirdChainSegments"
 
@@ -189,7 +188,7 @@ class MuonStandalone(ConfiguredMuonRec):
             self.addAlg(MooSegmentFinderNCBAlg("MuonSegmentMaker_NCB"))
 
             if (not cfgKeyStore.isInInput ('xAOD::MuonSegmentContainer', 'MuonSegments_NCB')):
-                self.addAlg( CfgMgr.xAODMaker__MuonSegmentCnvAlg("MuonSegmentCnvAlg_NCB",SegmentContainerName="NCB_MuonSegments",xAODContainerName="NCB_MuonSegments") )
+                self.addAlg( CfgMgr.xAODMaker__MuonSegmentCnvAlg("MuonSegmentCnvAlg_NCB",SegmentContainerName="NCB_TrackMuonSegments",xAODContainerName="NCB_MuonSegments") )
 
         if (not cfgKeyStore.isInInput ('xAOD::MuonSegmentContainer', 'MuonSegments')):
             self.addAlg( CfgMgr.xAODMaker__MuonSegmentCnvAlg("MuonSegmentCnvAlg") )
@@ -200,13 +199,9 @@ class MuonStandalone(ConfiguredMuonRec):
         #
         # add the algorithm (which uses the MuonTrackSteering)
         # 
-        TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder", TrackSteering = getPublicTool("MuonTrackSteering") )
+        TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder", TrackSteering=getPublicTool("MuonTrackSteering"), SpectrometerTrackOutputLocation="MuonSpectrometerTracks", MuonSegmentCollection="TrackMuonSegments")
         self.addAlg( TrackBuilder )
-        
-        self.registerOutputKey("MuonSpectrometerTracks",   self.MuPatTrackBuilder, "SpectrometerTrackOutputLocation")
-        self.registerInputKey ("MuonSegments", self.MuPatTrackBuilder, "MuonSegmentCollection"   )
 
-        
         if muonStandaloneFlags.createTrackParticles():
             xAODTrackParticleCnvAlg = MuonStandaloneTrackParticleCnvAlg("MuonStandaloneTrackParticleCnvAlg")
             self.addAlg( xAODTrackParticleCnvAlg )
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py
index b9b149554ae0..20be4a64712d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRecOutputItemList_jobOptions.py
@@ -82,8 +82,8 @@ if DetFlags.detdescr.Muon_on() and rec.doWriteESD():
    MuonESDList+=["RpcSectorLogicContainer#RPC_SECTORLOGIC"]
 
    # Segments
-   MuonESDList+=["Trk::SegmentCollection#MuonSegments"]
-   MuonESDList+=["Trk::SegmentCollection#NCB_MuonSegments"]
+   MuonESDList+=["Trk::SegmentCollection#TrackMuonSegments"]
+   MuonESDList+=["Trk::SegmentCollection#NCB_TrackMuonSegments"]
 
    # Tracks
    MuonESDList+=["TrackCollection#MuonSpectrometerTracks"] 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
index 9d974f2d0fcb..8b9dd8c52d36 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/src/MuonSegmentFinderAlg.h
@@ -106,11 +106,11 @@ class MuonSegmentFinderAlg : public AthReentrantAlgorithm {
         "Csc4dSegmentMaker/Csc4dSegmentMaker",
     };
 
-    // the following Trk::SegmentCollection MuonSegments are sttandard MuonSegments, the MuGirl segments are stored in MuonCreatorAlg.h
+    // the following Trk::SegmentCollection MuonSegments are standard MuonSegments, the MuGirl segments are stored in MuonCreatorAlg.h
     SG::WriteHandleKey<Trk::SegmentCollection> m_segmentCollectionKey{
         this,
         "SegmentCollectionName",
-        "MuonSegments",
+        "TrackMuonSegments",
         "Muon Segments",
     };
     SG::ReadHandleKey<Muon::CscPrepDataContainer> m_cscPrdsKey{
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
index e0760b9afdc0..e706b0081e11 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.cxx
@@ -10,7 +10,6 @@
 // PhysVal includes
 #include "MuonPhysValMonitoringTool.h"
 
-// FrameWork includes
 #include "GaudiKernel/IToolSvc.h"
 #include "xAODMuon/MuonContainer.h"
 #include "xAODMuon/MuonAuxContainer.h"
@@ -18,7 +17,6 @@
 #include "xAODMuon/SlowMuonContainer.h"
 #include "xAODMuon/SlowMuonAuxContainer.h"
 #include "xAODMuon/SlowMuon.h"
-
 #include "xAODTrigger/MuonRoI.h"
 #include "xAODTrigger/MuonRoIContainer.h"
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h"
@@ -29,9 +27,6 @@
 #include "xAODTruth/TruthVertexContainer.h"
 #include "xAODTruth/TruthVertexAuxContainer.h"
 #include "MuonHistUtils/MuonEnumDefs.h"
-
-#include "MuonCombinedToolInterfaces/IMuonPrintingTool.h"
-
 #include "xAODCore/ShallowCopy.h"
 #include "xAODBase/IParticleHelpers.h"
 
@@ -71,8 +66,6 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   m_muonPrinter("Rec::MuonPrintingTool/MuonPrintingTool"),
   m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
   m_trackSelector("InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedTrackSelectorTool"),
-  // m_muonResonanceSelectionTool("MuonResonanceSelectionTool/MuonZSelectionTool"),
-  // m_muonResonancePairingTool("MuonResonancePairingTool/ZmumuResonancePairingTool"),
   m_oUnmatchedRecoMuonPlots(nullptr),
   m_oUnmatchedTruthMuonPlots(nullptr),
   m_oUnmatchedRecoMuonTrackPlots(nullptr),
@@ -83,20 +76,6 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   m_h_overview_Z_mass_ID(nullptr)
 {
   // default for muon chains
-
-  declareProperty( "IsData", m_isData = false );
-  declareProperty( "MuonContainerName", m_muonsName = "Muons" );
-  declareProperty( "SlowMuonContainerName", m_slowMuonsName = "SlowMuons" );
-  declareProperty( "MuonTruthParticleContainerName", m_muonsTruthName = "MuonTruthParticles" );
-
-  declareProperty( "TrackContainerName", m_tracksName);
-  declareProperty( "FwdTrackContainerName", m_fwdtracksName);
-  declareProperty( "MuonTrackContainerName", m_muonTracksName );
-  declareProperty( "MuonExtrapolatedTrackContainerName", m_muonExtrapolatedTracksName);
-  declareProperty( "MuonOnlyExtrapolatedTrackContainerName", m_muonMSOnlyExtrapolatedTracksName);
-  declareProperty( "MuonSegmentContainerName", m_muonSegmentsName);
-  declareProperty( "MuonTruthSegmentContainerName", m_muonSegmentsTruthName = "MuonTruthSegments" );
-  
   declareProperty( "TrackSelector", m_trackSelector);
   declareProperty( "IsoTool", m_isoTool );
   
@@ -107,24 +86,9 @@ MuonPhysValMonitoringTool::MuonPhysValMonitoringTool( const std::string& type,
   declareProperty( "SelectMuonCategories", m_selectMuonCategories );
   declareProperty( "DoBinnedResolutionPlots", m_doBinnedResolutionPlots = true);
 
-  declareProperty( "DoTrigMuonValidation", m_doTrigMuonValidation = false);
-  declareProperty( "DoTrigMuonL1Validation", m_doTrigMuonL1Validation = false);
-  declareProperty( "DoTrigMuonL2Validation", m_doTrigMuonL2Validation = false);
-  declareProperty( "DoTrigMuonEFValidation", m_doTrigMuonEFValidation = false);
-  declareProperty( "L1TrigMuonContainerName", m_muonL1TrigName = "LVL1MuonRoIs");
-  declareProperty( "L2SAMuonContainerName",m_muonL2SAName = "HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfo");
-  declareProperty( "L2CBMuonContainerName",m_muonL2CBName = "HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfo");
-  declareProperty( "EFCombTrigMuonContainerName", m_muonEFCombTrigName = "HLT_xAOD__MuonContainer_MuonEFInfo");
-  declareProperty( "DoMuonTree", m_doMuonTree = false);
-
   m_SelectedAuthor = 0;
 }
 
-// Destructor
-///////////////
-MuonPhysValMonitoringTool::~MuonPhysValMonitoringTool()
-{}
-
 // Athena algtool's Hooks
 ////////////////////////////
 StatusCode MuonPhysValMonitoringTool::initialize()
@@ -239,6 +203,7 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
   bool separateSAFMuons = true;
   if (m_slowMuonsName!="") separateSAFMuons = false; // no such muons in case of SlowMuon reco
   
+  std::string muonContainerName = m_muonsName.name();
   for (const auto category : m_selectMuonCategoriesStr) {
     std::string categoryPath = m_muonsName+"/"+category+"/";
     m_muonValidationPlots.push_back( new MuonValidationPlots(0, categoryPath,
@@ -255,7 +220,7 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     }
     if (m_muonTracksName!="") {
       m_muonMSTrackValidationPlots.push_back(new MuonTrackValidationPlots(0, categoryPath, "MSTrackParticles", m_isData));
-      if (!m_isData) m_oUnmatchedRecoMuonTrackPlots = new Muon::RecoMuonTrackPlotOrganizer(0, Form("%s/UnmatchedRecoMuonTracks/",m_muonsName.c_str()));
+      if (!m_isData) m_oUnmatchedRecoMuonTrackPlots = new Muon::RecoMuonTrackPlotOrganizer(0, Form("%s/UnmatchedRecoMuonTracks/",muonContainerName.c_str()));
     }
     if (m_muonExtrapolatedTracksName!="") m_muonMETrackValidationPlots.push_back(new MuonTrackValidationPlots(0, categoryPath, "METrackParticles", m_isData));
     if (m_muonMSOnlyExtrapolatedTracksName!="") m_muonMSOnlyMETrackValidationPlots.push_back(new MuonTrackValidationPlots(0, categoryPath, "MSOnlyMETrackParticles", m_isData));
@@ -269,13 +234,13 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     if (m_muonSegmentsName!="") {
       if (category!=theMuonCategories[ALL]) continue; //cannot identify the truth origin of segments...
       m_muonSegmentValidationPlots.push_back(new MuonSegmentValidationPlots(0, categoryPath, m_isData));
-      if (!m_isData) m_oUnmatchedRecoMuonSegmentPlots = new Muon::MuonSegmentPlots(0, Form("%s/UnmatchedRecoMuonSegments/",m_muonsName.c_str()));	    
+      if (!m_isData) m_oUnmatchedRecoMuonSegmentPlots = new Muon::MuonSegmentPlots(0, Form("%s/UnmatchedRecoMuonSegments/",muonContainerName.c_str()));
     }
   }
 
   if (!m_isData) {
-    m_oUnmatchedRecoMuonPlots = new Muon::RecoMuonPlotOrganizer(0, Form("%s/UnmatchedRecoMuons/",m_muonsName.c_str()));
-    m_oUnmatchedTruthMuonPlots = new Muon::TruthMuonPlotOrganizer(0, Form("%s/UnmatchedTruthMuons/",m_muonsName.c_str()));
+    m_oUnmatchedRecoMuonPlots = new Muon::RecoMuonPlotOrganizer(0, Form("%s/UnmatchedRecoMuons/",muonContainerName.c_str()));
+    m_oUnmatchedTruthMuonPlots = new Muon::TruthMuonPlotOrganizer(0, Form("%s/UnmatchedTruthMuons/",muonContainerName.c_str()));
   }   
 
   for (const auto plots : m_muonValidationPlots)                 bookValidationPlots(*plots).ignore();
@@ -295,37 +260,37 @@ StatusCode MuonPhysValMonitoringTool::bookHistograms()
     if (m_oUnmatchedRecoMuonSegmentPlots) bookValidationPlots(*m_oUnmatchedRecoMuonSegmentPlots).ignore();
   }
   //book overview hists
-  m_h_overview_Z_mass = new TH1F(Form("%s_Overview_Z_mass",m_muonsName.c_str()),"",20,76,106);
-  ATH_CHECK(regHist(m_h_overview_Z_mass,Form("%s/Overview",m_muonsName.c_str()),all));
-  m_h_overview_Z_mass_ME = new TH1F(Form("%s_Overview_Z_mass_ME",m_muonsName.c_str()),"",20,76,106);
-  ATH_CHECK(regHist(m_h_overview_Z_mass_ME,Form("%s/Overview",m_muonsName.c_str()),all));
-  m_h_overview_Z_mass_ID = new TH1F(Form("%s_Overview_Z_mass_ID",m_muonsName.c_str()),"",20,76,106);
-  ATH_CHECK(regHist(m_h_overview_Z_mass_ID,Form("%s/Overview",m_muonsName.c_str()),all));
+  m_h_overview_Z_mass = new TH1F(Form("%s_Overview_Z_mass",muonContainerName.c_str()),"",20,76,106);
+  ATH_CHECK(regHist(m_h_overview_Z_mass,Form("%s/Overview",muonContainerName.c_str()),all));
+  m_h_overview_Z_mass_ME = new TH1F(Form("%s_Overview_Z_mass_ME",muonContainerName.c_str()),"",20,76,106);
+  ATH_CHECK(regHist(m_h_overview_Z_mass_ME,Form("%s/Overview",muonContainerName.c_str()),all));
+  m_h_overview_Z_mass_ID = new TH1F(Form("%s_Overview_Z_mass_ID",muonContainerName.c_str()),"",20,76,106);
+  ATH_CHECK(regHist(m_h_overview_Z_mass_ID,Form("%s/Overview",muonContainerName.c_str()),all));
   
   m_h_overview_nObjects.clear();
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_muons",m_muonsName.c_str()), "Number of truth Muons per event", 20, -0.5, 19.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_muons",m_muonsName.c_str()), "Number of Muons per event", 20, -0.5, 19.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_tracks",m_muonsName.c_str()), "Number of Tracks per event", 50, -0.5, 49.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_segments",m_muonsName.c_str()), "Number of truth Segments per event", 200, -0.5, 199.5));
-  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_segments",m_muonsName.c_str()), "Number of Segments per event", 200, -0.5, 199.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_muons",muonContainerName.c_str()), "Number of truth Muons per event", 20, -0.5, 19.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_muons",muonContainerName.c_str()), "Number of Muons per event", 20, -0.5, 19.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_tracks",muonContainerName.c_str()), "Number of Tracks per event", 50, -0.5, 49.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_truth_segments",muonContainerName.c_str()), "Number of truth Segments per event", 200, -0.5, 199.5));
+  m_h_overview_nObjects.push_back(new TH1F(Form("%s_Overview_N_perevent_segments",muonContainerName.c_str()), "Number of Segments per event", 200, -0.5, 199.5));
   for (const auto hist : m_h_overview_nObjects) {
-    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",m_muonsName.c_str()),all));
+    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",muonContainerName.c_str()),all));
   }
 
-  m_h_overview_reco_category = new TH1F(Form("%s_Overview_reco_category",m_muonsName.c_str()),"",4,0,4); //prompt/in-flight/non-isolated/other
+  m_h_overview_reco_category = new TH1F(Form("%s_Overview_reco_category",muonContainerName.c_str()),"",4,0,4); //prompt/in-flight/non-isolated/other
   for (int i=1; i<4; i++) { //skip 'All'
     m_h_overview_reco_category->GetXaxis()->SetBinLabel(i,theMuonCategories[i].c_str());
   } m_h_overview_reco_category->GetXaxis()->SetBinLabel(4,"Other"); //of some other origin or fakes
-  ATH_CHECK(regHist(m_h_overview_reco_category,Form("%s/Overview",m_muonsName.c_str()),all));
+  ATH_CHECK(regHist(m_h_overview_reco_category,Form("%s/Overview",muonContainerName.c_str()),all));
 
   int nAuth = xAOD::Muon::NumberOfMuonAuthors;
   for (int i=1; i<4; i++) {
-    m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),(m_muonsName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
+    m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),(muonContainerName+"_"+theMuonCategories[i]+"_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
   }
-  m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_Overview_Other_reco_authors").c_str(),(m_muonsName+"_Other_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
+  m_h_overview_reco_authors.push_back(new TH1F((m_muonsName+"_Overview_Other_reco_authors").c_str(),(muonContainerName+"_Other_reco_authors").c_str(),nAuth+1,-0.5,nAuth+0.5));
   
   for (const auto hist : m_h_overview_reco_authors) {
-    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",m_muonsName.c_str()),all));
+    if (hist) ATH_CHECK(regHist(hist,Form("%s/Overview",muonContainerName.c_str()),all));
   }
 
   return StatusCode::SUCCESS;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
index 7af96ecbccbf..fa897be1a74e 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonPhysValMonitoring/src/MuonPhysValMonitoringTool.h
@@ -10,11 +10,6 @@
 #ifndef MUONPHYSVALMONITORING_MUONPHYSVALMONITORINGTOOL_H
 #define MUONPHYSVALMONITORING_MUONPHYSVALMONITORINGTOOL_H
 
-// STL includes
-#include <string>
-#include <vector>
-
-// FrameWork includes
 #include "GaudiKernel/ServiceHandle.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "xAODTruth/TruthParticleContainer.h"
@@ -23,32 +18,23 @@
 #include "xAODTrigMuon/L2StandAloneMuon.h"
 #include "xAODTrigMuon/L2CombinedMuonContainer.h"
 #include "xAODTrigMuon/L2CombinedMuon.h"
-
 #include "xAODMuon/SlowMuon.h"
 #include "xAODEventInfo/EventInfo.h"
-
-// Tools
 #include "MuonAnalysisInterfaces/IMuonSelectionTool.h"
 #include "TrigDecisionTool/TrigDecisionTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
 #include "IsolationSelection/IIsolationSelectionTool.h"
-
-
-
-// Local includes
+#include "MuonCombinedToolInterfaces/IMuonPrintingTool.h"
 #include "AthenaMonitoring/ManagedMonitorToolBase.h"
-
-// Root includes
 #include "MuonValidationPlots.h"
 #include "TriggerMuonValidationPlots.h"
 #include "MuonTrackValidationPlots.h"
 #include "MuonSegmentValidationPlots.h"
 #include "SlowMuonValidationPlots.h"
 
-// Forward declaration
-namespace Rec {
-  class IMuonPrintingTool;
-}
+#include <string>
+#include <vector>
+
 namespace MuonPhysValMonitoring {
 
 class MuonPhysValMonitoringTool
@@ -67,7 +53,7 @@ class MuonPhysValMonitoringTool
 		  const IInterface* parent );
 
   /// Destructor: 
-  virtual ~MuonPhysValMonitoringTool(); 
+  virtual ~MuonPhysValMonitoringTool()=default;
 
   // Athena algtool's Hooks
   virtual StatusCode initialize();
@@ -124,26 +110,23 @@ class MuonPhysValMonitoringTool
   TH1F* findHistogram(std::vector<HistData> hists,std::string hnameTag,std::string hdirTag,std::string hNewName);
   void modifyHistogram(TH1* hist);
 
-  bool m_isData;
-
-
-
+  Gaudi::Property<bool> m_isData{this,"IsData",false};
 
   // Containers
-  std::string m_tracksName;
-  std::string m_fwdtracksName;
-  std::string m_muonsName;
-  std::string m_slowMuonsName;
-  std::string m_muonsTruthName;
-  std::string m_muonTracksName;
-  std::string m_muonExtrapolatedTracksName;
-  std::string m_muonMSOnlyExtrapolatedTracksName;
-  std::string m_muonSegmentsName;
-  std::string m_muonSegmentsTruthName;
-  std::string m_muonL1TrigName;
-  std::string m_muonL2SAName;
-  std::string m_muonL2CBName;
-  std::string m_muonEFCombTrigName;
+  Gaudi::Property<std::string> m_tracksName{this,"TrackContainerName",""};
+  Gaudi::Property<std::string> m_fwdtracksName{this,"FwdTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonsName{this,"MuonContainerName","Muons"};
+  Gaudi::Property<std::string> m_slowMuonsName{this,"SlowMuonContainerName","SlowMuons"};
+  Gaudi::Property<std::string> m_muonsTruthName{this,"MuonTruthParticleContainerName","MuonTruthParticles"};
+  Gaudi::Property<std::string> m_muonTracksName{this,"MuonTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonExtrapolatedTracksName{this,"MuonExtrapolatedTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonMSOnlyExtrapolatedTracksName{this,"MuonOnlyExtrapolatedTrackContainerName",""};
+  Gaudi::Property<std::string> m_muonSegmentsName{this,"MuonSegmentContainerName",""};
+  Gaudi::Property<std::string> m_muonSegmentsTruthName{this,"MuonTruthSegmentContainerName","MuonTruthSegments"};
+  Gaudi::Property<std::string> m_muonL1TrigName{this,"L1TrigMuonContainerName","LVL1MuonRoIs"};
+  Gaudi::Property<std::string> m_muonL2SAName{this,"L2SAMuonContainerName","HLT_xAOD__L2StandAloneMuonContainer_MuonL2SAInfo"};
+  Gaudi::Property<std::string> m_muonL2CBName{this,"L2CBMuonContainerName","HLT_xAOD__L2CombinedMuonContainer_MuonL2CBInfo"};
+  Gaudi::Property<std::string> m_muonEFCombTrigName{this,"EFCombTrigMuonContainerName","HLT_xAOD__MuonContainer_MuonEFInfo"};
 
   SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo{this,"EventInfo","EventInfo","event info"};
 
@@ -158,13 +141,11 @@ class MuonPhysValMonitoringTool
   int m_SelectedAuthor;
   std::vector<unsigned int> m_selectMuonCategories;  
   bool m_doBinnedResolutionPlots;
-  bool m_doTrigMuonValidation;
-  bool m_doTrigMuonL1Validation;
-  bool m_doTrigMuonL2Validation;
-  bool m_doTrigMuonEFValidation;
-  bool m_doMuonTree;
-
-
+  Gaudi::Property<bool> m_doTrigMuonValidation{this,"DoTrigMuonValidation",false};
+  Gaudi::Property<bool> m_doTrigMuonL1Validation{this,"DoTrigMuonL1Validation",false};
+  Gaudi::Property<bool> m_doTrigMuonL2Validation{this,"DoTrigMuonL2Validation",false};
+  Gaudi::Property<bool> m_doTrigMuonEFValidation{this,"DoTrigMuonEFValidation",false};
+  Gaudi::Property<bool> m_doMuonTree{this,"DoMuonTree",false};
   
   // Tools
   ToolHandle<CP::IMuonSelectionTool> m_muonSelectionTool;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h
index e13ed2a63f06..ceebb0af9f32 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValAlg.h
@@ -90,7 +90,7 @@ class CSCSegmValAlg : public ManagedMonitorToolBase {
   std::vector<std::string> m_sampSelTriggers;
   bool m_doEvtSel;
 
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","TrackMuonSegments","muon segments"};
   double m_segmSlope;
 
   bool m_debuglevel;           //!< private member to control debug messages
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
index 54a68b8bf31d..6408400df38c 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/CscRawDataMonitoring/CSCSegmValMonAlg.h
@@ -58,7 +58,8 @@ class CSCSegmValMonAlg : public AthMonitorAlgorithm {
     "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc", 
     "Handle to the service providing the IMuonEDMHelperSvc interface" };
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKey{this,"SegmentKey","TrackMuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segmKeyAlt{this,"SegmentKey","MuonSegments","muon segments"};
 
   Gaudi::Property<std::vector<std::string>> m_sampSelTriggers{this,"EventSelTriggers",{}};
   Gaudi::Property<bool> m_doEvtSel{this,"DoEventSelection",false};
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py
index fa5864cfefeb..4cd3a3f39cda 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CSCMon_jobOptions.py
@@ -36,8 +36,6 @@ def getInputFiles(dir, AODHLTP):
 # Input files
 ##############################
 
-#AODir = ['/raid01/venkat/dataset/data/csc/2011/mcpskim/data10_7TeV.*.phys*', 'data10_7TeV*DESD_ZMUMU*']
-#AODir2 = ['/raid01/jveatch/data/dataset/CSCMon/data11_7TeV.00189751.physics_Muons.recon.DESD_ZMUMU.f405_m716_f405', 'data11_7TeV*DESD_ZMUMU*']
 AODir2=['/afs/cern.ch/work/p/panagoul/CSC_data', 'data15_13TeV.00280950*']
 
 CSCInputFiles = []
@@ -262,7 +260,7 @@ if doCSCSegm:
   ## trigger-aware monitoring: sample seletion triggers (express stream menu physics_pp_v2)
   evtSelectionTriggers = [  "L1_MU10", "L1_MU15", "EF_mu20_muCombTag_NoEF", "EF_mu15", "EF_mu15_mu10_EFFS", "EF_2mu10", "EF_2mu10_loose" ]
 
-  CSCSegmValAlg = CSCSegmValAlg ( name = "CSCSegmValAlg", SegmentKey = "MuonSegments",
+  CSCSegmValAlg = CSCSegmValAlg ( name = "CSCSegmValAlg",
     TrigDecisionTool = ToolSvc.TrigDecisionTool, DoEventSelection = False, EventSelTriggers = evtSelectionTriggers,
     SegmentSlopeCut = 0.07, ClusterStatus = clusStatWords)
 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py
index a4879b152c0e..abac9f678a9e 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/share/CscRawESD_MonitoringOptions.py
@@ -87,8 +87,6 @@ topSequence += cscesdRawMonMan
 # CSC Segment Monitoring
 #---------------------------------------------------------------
 from CscRawDataMonitoring.CscRawDataMonitoringConf import CSCSegmValAlg
-#from MuonDQAMonFlags.MuonDQAFlags import MuonDQAFlags as MuonDQAFlags
-#MuonDQAFlags.doMuonSegmMon = True
 
 ## TDT instance (this should be done already?)
 if(DQMonFlags.useTrigger() and hasattr(ToolSvc, DQMonFlags.nameTrigDecTool())):
@@ -106,8 +104,6 @@ clusStatWords = [ "Unspoiled", "Simple", "Edge", "MultiPeak", "Narrow",
 evtSelectionTriggers = [  "L1_MU10", "L1_MU15", "EF_mu20_muCombTag_NoEF", "EF_mu15", "EF_mu15_mu10_EFFS", "EF_2mu10", "EF_2mu10_loose" ]
 
 CSCSegmESDValAlg = CSCSegmValAlg ( name = "CSCSegmValAlg", 
-                                   SegmentKey = "MuonSegments",
-                                   #TrigDecisionTool = ToolSvc.TrigDecisionTool, 
                                    DoEventSelection = False, 
                                    EventSelTriggers = evtSelectionTriggers,
                                    SegmentSlopeCut = 0.07, 
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
index 9f5c01e880cd..3ddfb1cf6226 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/CscRawDataMonitoring/src/CSCSegmValMonAlg.cxx
@@ -46,6 +46,7 @@ StatusCode CSCSegmValMonAlg::initialize() {
   ATH_CHECK(m_edmHelperSvc.retrieve());
   ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK(m_segmKey.initialize());
+  ATH_CHECK(m_segmKeyAlt.initialize());
 
   return AthMonitorAlgorithm::initialize();
 }  
@@ -76,6 +77,17 @@ StatusCode CSCSegmValMonAlg::fillHistograms(const EventContext& ctx) const{
     }
 
     SG::ReadHandle<Trk::SegmentCollection> segments(m_segmKey, ctx);
+    if (!segments.isValid()) {
+      if (m_segmKey.key()=="TrackMuonSegments") {
+        // old DataQuality_required input file (/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q431/21.0/myESD.pool.root) still has 'MuonSegments' stored
+        // -> @TODO: need updated input file (temporary workaround: retrieve 'MuonSegments' instead if 'TrackMuonSegments' here)
+        segments = SG::ReadHandle<Trk::SegmentCollection>(m_segmKeyAlt, ctx);
+      }
+      if (!segments.isValid()) {
+        ATH_MSG_ERROR("Could not retrieve Trk::SegmentCollection "<<m_segmKey.key());
+        return StatusCode::FAILURE;
+      }
+    }
 
     if ( segments->empty() ){
       ATH_MSG_DEBUG( "      Segm Collection is Empty, done...    ");
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
index 351fe161c323..1d7de7822b6c 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonAlg.h
@@ -160,7 +160,8 @@ class MdtRawDataMonAlg: public AthMonitorAlgorithm {
 
   bool m_atlas_ready;
 
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","TrackMuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_typeAlt{this,"Eff_segm_typeAlt","MuonSegments","muon segments"};
 
   std::string returnString(int i) const{
     std::stringstream ss;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h
index ccac9d53b25d..6df5cbf4b05f 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataMonitoring/MdtRawDataValAlg.h
@@ -176,7 +176,7 @@ class MdtRawDataValAlg: public ManagedMonitorToolBase {
   uint32_t m_firstTime;
   int m_numberOfEvents;
 
-  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","MuonSegments","muon segments"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_segm_type{this,"Eff_segm_type","TrackMuonSegments","muon segments"};
 
   std::string returnString(int i){
     std::stringstream ss;
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
index cf5c608a021e..decb471fda62 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataMonAlg.cxx
@@ -205,6 +205,7 @@ StatusCode MdtRawDataMonAlg::initialize()
   ATH_CHECK(m_l1RoiKey.initialize(SG::AllowEmpty));
   ATH_CHECK(m_muonKey.initialize());
   ATH_CHECK(m_segm_type.initialize());
+  ATH_CHECK(m_segm_typeAlt.initialize());
   ATH_CHECK(m_key_mdt.initialize());
   ATH_CHECK(m_key_rpc.initialize());
   ATH_CHECK(m_eventInfo.initialize());
@@ -528,10 +529,16 @@ StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const
   }   //m_doMdtESD==true
 
   SG::ReadHandle<Trk::SegmentCollection> segms(m_segm_type, ctx);
-  if (!segms.isValid())
-  {
-    ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << m_segm_type);
-    return StatusCode::FAILURE;
+  if (!segms.isValid()) {
+    if (m_segm_type.key()=="TrackMuonSegments") {
+      // old DataQuality_required input file (/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q431/21.0/myESD.pool.root) still has 'MuonSegments' stored
+      // -> @TODO: need updated input file (temporary workaround: retrieve 'MuonSegments' instead if 'TrackMuonSegments' here)
+      segms = SG::ReadHandle<Trk::SegmentCollection>(m_segm_typeAlt, ctx);
+    }
+    if (!segms.isValid()) {
+      ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << m_segm_type);
+      return StatusCode::FAILURE;
+    }
   }
 
   MDTSegmentHistogramStruct segsPlots[4][4][16]; // [region][layer][phi]
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py
index 178a553d4897..1b900146981e 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DESDM_IDALIGN.py
@@ -153,8 +153,8 @@ outList = CfgItemList( 'IDALIGN',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py
index b0cd14500f25..95d0fdbf71a1 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DESD_DEDX.py
@@ -152,8 +152,8 @@ outList = CfgItemList( 'DEDX',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py
index ad5c959959a8..a7b01fe321f8 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_MS.py
@@ -344,7 +344,7 @@ AlignmentTriggerMuonStream.AddItem(["Muon::TgcPrepDataContainer#*"])
 AlignmentTriggerMuonStream.AddItem(["Muon::CscPrepDataContainer#*"])
 AlignmentTriggerMuonStream.AddItem(["Muon::MdtPrepDataContainer#*"])
 #Alignment
-AlignmentTriggerMuonStream.AddItem(["Trk::SegmentCollection#MuonSegments"])
+AlignmentTriggerMuonStream.AddItem(["Trk::SegmentCollection#TrackMuonSegments"])
 AlignmentTriggerMuonStream.AddItem(["xAOD::VertexContainer#PrimaryVertices"])
 AlignmentTriggerMuonStream.AddItem(["xAOD::VertexAuxContainer#PrimaryVerticesAux.-vxTrackAtVertex.-MvfFitInfo.-isInitialized.-VTAV"])
 AlignmentTriggerMuonStream.AddItem(["TrackCollection#MuonSpectrometerTracks"])
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py
index 92370c88d5d0..8925dacd9863 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_AllCells.py
@@ -152,8 +152,8 @@ outList = CfgItemList( 'ALLCELLS',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py
index 873ea275292f..0500c707c200 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EGamma.py
@@ -369,8 +369,8 @@ outList = CfgItemList( 'EGAMMA',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py
index 32a9cd5799e5..0d6c6aa615fa 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_EOverP.py
@@ -167,8 +167,8 @@ outList = CfgItemList( 'EOVERP',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py
index 6821fb98a2a6..15d33cdef832 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_Jet.py
@@ -291,8 +291,8 @@ outList = CfgItemList( 'CALJET',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py
index abf3d52003fa..d965f339be0c 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_PhotonJet.py
@@ -119,8 +119,8 @@ outList = CfgItemList( 'PHOJET',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py
index 0f143aff0429..5c64c8c8bc80 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_SGLEL.py
@@ -119,8 +119,8 @@ outList = CfgItemList( 'SGLEL',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py
index b0867f88fef0..190c826e3e5a 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_TtbarMuon.py
@@ -165,8 +165,8 @@ outList = CfgItemList( 'SLTTMU',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py
index 4c9c35e07be4..773475f23e84 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDPD_HIPs.py
@@ -117,8 +117,8 @@ outList = CfgItemList( 'HIPsStream',
     'xAOD::TrigNavigationAuxInfo#TrigNavigationAux.',
     'xAOD::TrigDecision#xTrigDecision',
     'xAOD::JetEtRoI#LVL1JetEtRoI',
-    'Trk::SegmentCollection#MuonSegments',
-    'Trk::SegmentCollection#NCB_MuonSegments',
+    'Trk::SegmentCollection#TrackMuonSegments',
+    'Trk::SegmentCollection#NCB_TrackMuonSegments',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMPFlowAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4EMTopoAux.',
     'xAOD::MissingETAuxAssociationMap#METAssoc_AntiKt4LCTopoAux.',
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
index dbebf2928022..5e1c2c3386c9 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
@@ -20,7 +20,7 @@
 
 #include <string>
 
-// uses (further down the call chain) the MuPatHitTool that has a mutable cache of pointers to-be-deleted and the end of the event
+// uses (further down the call chain) the MuPatHitTool that has a mutable cache of pointers to-be-deleted at the end of the event
 // thus, currently, the MuonCombinedInDetExtensionAlg cannot become an AthReentrantAlgorithm
 class MuonCombinedInDetExtensionAlg : public AthAlgorithm {
   public:
@@ -92,12 +92,11 @@ class MuonCombinedInDetExtensionAlg : public AthAlgorithm {
         "MuGirlMETracks",
         "ME track collection",
     };
-    // these are the MuGirl segments inputs
     SG::WriteHandleKey<Trk::SegmentCollection> m_segments{
         this,
         "SegmentCollection",
-        "MuGirlSegments",
-        "Segment collection",
+        "",
+        "specify segment collection",
     };
 
     Gaudi::Property<bool> m_usePRDs{this, "usePRDs", false};
diff --git a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
index 3ba9de7e4146..eee23de4e0d0 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedConfig/python/MuonCombinedReconstructionConfig.py
@@ -32,7 +32,6 @@ def MuonCaloTagAlgCfg(flags, name="MuonCaloTagAlg",**kwargs):
     kwargs.setdefault("TagMap","caloTagMap")
     kwargs.setdefault("CombinedTrackCollection","")
     kwargs.setdefault("METrackCollection","")
-    kwargs.setdefault("SegmentCollection","")
     kwargs.setdefault("HasCSC", flags.Detector.GeometryCSC )
     kwargs.setdefault("HasSTgc", flags.Detector.GeometrysTGC )
     kwargs.setdefault("HasMM", flags.Detector.GeometryMM )
@@ -111,6 +110,7 @@ def MuonInsideOutRecoAlgCfg(flags, name="MuonInsideOutRecoAlg", **kwargs ):
     kwargs.setdefault("HasSTgc", flags.Detector.GeometrysTGC )
     kwargs.setdefault("HasMM", flags.Detector.GeometryMM )
     kwargs.setdefault("TagMap","muGirlTagMap")
+    kwargs.setdefault("SegmentCollection","MuGirlSegments")
     alg = CompFactory.MuonCombinedInDetExtensionAlg(name,**kwargs)
     result.addEventAlgo( alg, primary=True )
     return result
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 3baeb10f2c1e..7bfa7f169bb6 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -15,24 +15,12 @@ from InDetRecExample.InDetKeys import InDetKeys
 from InDetRecExample.InDetJobProperties import InDetFlags
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
-def MuonCombinedInDetExtensionAlg(name="MuonCombinedInDetExtensionAlg",**kwargs):
-    tools = []
-    if muonCombinedRecFlags.doCaloTrkMuId():
-        tools.append(getPublicTool("MuonCaloTagTool"))
-        kwargs.setdefault("TagMap", "caloTagMap" )
-    kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
-    kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
-    kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
-    kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
-    return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
-
 def MuonCaloTagAlg(name="MuonCaloTagAlg",**kwargs):
     tools = [getPublicTool("MuonCaloTagTool")]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
     kwargs.setdefault("TagMap","caloTagMap")
     kwargs.setdefault("CombinedTrackCollection","")
     kwargs.setdefault("METrackCollection","")
-    kwargs.setdefault("SegmentCollection","")
     kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
     kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
@@ -45,13 +33,11 @@ def MuonCaloTagAlg_LRT(name="MuonCaloTagAlg_LRT", **kwargs):
     kwargs.setdefault("InDetCandidateLocation", MuonCbKeys.InDetTrackParticlesLargeD0())  
     kwargs.setdefault("CombinedTrackCollection","")
     kwargs.setdefault("METrackCollection","")
-    kwargs.setdefault("SegmentCollection","")
     kwargs.setdefault("HasCSC", MuonGeometryFlags.hasCSC() )
     kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
-
 def MuonSegmentTagAlg( name="MuonSegmentTagAlg", **kwargs ):
     kwargs.setdefault("MuonSegmentTagTool", getPublicTool("MuonSegmentTagTool") )
     return CfgMgr.MuonSegmentTagAlg(name,**kwargs)
@@ -63,7 +49,6 @@ def MuonSegmentTagAlg_LRT( name="MuonSegmentTagAlg_LRT", **kwargs ):
     kwargs.setdefault("MuonSegmentLocation","MuonSegments")
     return CfgMgr.MuonSegmentTagAlg(name,**kwargs)
 
-                                                                        
 def MuonInsideOutRecoAlg( name="MuonInsideOutRecoAlg", **kwargs ):
     tools = [getPublicTool("MuonInsideOutRecoTool") ]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
@@ -72,9 +57,9 @@ def MuonInsideOutRecoAlg( name="MuonInsideOutRecoAlg", **kwargs ):
     kwargs.setdefault("HasSTgc", MuonGeometryFlags.hasSTGC() )
     kwargs.setdefault("HasMM", MuonGeometryFlags.hasMM() )
     kwargs.setdefault("TagMap","muGirlTagMap")
+    kwargs.setdefault("SegmentCollection","MuGirlSegments")
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
-
 def MuGirlAlg_LRT( name="MuGirlAlg_LRT", **kwargs ):
     tools = [getPublicTool("MuonInsideOutRecoTool") ]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
@@ -88,11 +73,7 @@ def MuGirlAlg_LRT( name="MuGirlAlg_LRT", **kwargs ):
     kwargs.setdefault("CombinedTrackCollection",MuonCbKeys.MuGirlMuonsLargeD0())
     kwargs.setdefault("InDetCandidateLocation",MuonCbKeys.InDetTrackParticlesLargeD0())
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
-    
 
-                                  
-                               
-                                 
 def MuGirlStauAlg(name="MuGirlStauAlg",**kwargs):
     tools = [getPublicTool("MuonStauRecoTool")]
     kwargs.setdefault("MuonCombinedInDetExtensionTools", tools )
diff --git a/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h b/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h
index a1ab60154fd0..3fc5e5a9b5af 100644
--- a/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h
+++ b/Reconstruction/RecBackground/RecBackgroundAlgs/RecBackgroundAlgs/BeamBackgroundFiller.h
@@ -64,10 +64,10 @@ private:
   void PrintMatchMatrix() {};
 
   /** ReadHandleKey for Trk::SegmentCollection from CSC */
-  SG::ReadHandleKey<Trk::SegmentCollection> m_cscSegmentContainerReadHandleKey{this,"cscSegmentContainerKey","NCB_MuonSegments","ReadHandleKey for Trk::SegmentCollection from CSC"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_cscSegmentContainerReadHandleKey{this,"cscSegmentContainerKey","NCB_TrackMuonSegments","ReadHandleKey for Trk::SegmentCollection from CSC"};
 
   /** ReadHandleKey for Trk::SegmentCollection from MDT */
-  SG::ReadHandleKey<Trk::SegmentCollection> m_mdtSegmentContainerReadHandleKey{this,"mdtSegmentContainerKey","MuonSegments","ReadHandleKey for Trk::SegmentCollection from MDT"};
+  SG::ReadHandleKey<Trk::SegmentCollection> m_mdtSegmentContainerReadHandleKey{this,"mdtSegmentContainerKey","TrackMuonSegments","ReadHandleKey for Trk::SegmentCollection from MDT"};
 
   /** ReadHandleKey for CaloClusterContainer */
   SG::ReadHandleKey<xAOD::CaloClusterContainer> m_caloClusterContainerReadHandleKey{this,"caloClusterContainerKey","CaloCalTopoClusters","ReadHandleKey for CaloClusterContainer"};
diff --git a/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py b/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py
index 9937ad41a639..df66e6a5dd4f 100644
--- a/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py
+++ b/Reconstruction/RecBackground/RecBackgroundAlgs/share/RecBackground_jobOptions.py
@@ -8,7 +8,7 @@ if rec.doInDet() and rec.doMuon() and rec.doCalo() and \
     DetFlags.detdescr.Muon_on() and DetFlags.detdescr.Calo_on() and DetFlags.detdescr.ID_on() :
   include ("LArCellRec/LArCollisionTime_jobOptions.py")
   from RecBackgroundAlgs.RecBackgroundAlgsConf import BeamBackgroundFiller
-  BeamBackgroundFiller=BeamBackgroundFiller(cscSegmentContainerKey=("NCB_MuonSegments" if MuonGeometryFlags.hasCSC() else ""))
+  BeamBackgroundFiller=BeamBackgroundFiller(cscSegmentContainerKey=("NCB_TrackMuonSegments" if MuonGeometryFlags.hasCSC() else ""))
   topSequence+=BeamBackgroundFiller
 
   from BCM_BackgroundAlgs.BCM_BackgroundAlgsConf import BcmCollisionTimeAlg
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index b3de9157559c..bfffeaf4b4e5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -613,7 +613,7 @@ def muEFSARecoSequence( RoIs, name ):
       Cleaner.PullCutPhi = 3
       SegmentFinder.TrackCleaner = Cleaner
       
-      theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,SegmentCollectionName="MuonSegments",
+      theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,
                                                        MuonPatternCalibration = CfgGetter.getPublicTool("MuonPatternCalibration"), 
                                                        MuonPatternSegmentMaker = CfgGetter.getPublicTool("MuonPatternSegmentMaker"), 
                                                        MuonTruthSummaryTool = None)
@@ -630,7 +630,7 @@ def muEFSARecoSequence( RoIs, name ):
     theSegmentFinderAlg = MooSegmentFinderAlg("TrigMuonSegmentMaker_"+name)
 
   from MuonSegmentTrackMaker.MuonTrackMakerAlgsMonitoring import MuPatTrackBuilderMonitoring
-  TrackBuilder = CfgMgr.MuPatTrackBuilder("TrigMuPatTrackBuilder_"+name ,MuonSegmentCollection = "MuonSegments", 
+  TrackBuilder = CfgMgr.MuPatTrackBuilder("TrigMuPatTrackBuilder_"+name ,MuonSegmentCollection = "TrackMuonSegments", 
                                           TrackSteering=CfgGetter.getPublicToolClone("TrigMuonTrackSteering", "MuonTrackSteering"), 
                                           MonTool = MuPatTrackBuilderMonitoring("MuPatTrackBuilderMonitoringSA_"+name))
   xAODTrackParticleCnvAlg = MuonStandaloneTrackParticleCnvAlg("TrigMuonStandaloneTrackParticleCnvAlg_"+name)
@@ -846,7 +846,7 @@ def muEFInsideOutRecoSequence(RoIs, name):
         Cleaner.PullCutPhi = 3
         SegmentFinder.TrackCleaner = Cleaner
       
-        theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,SegmentCollectionName="MuonSegments",
+        theSegmentFinderAlg = CfgMgr.MuonSegmentFinderAlg( "TrigMuonSegmentMaker_"+name,
                                                            MuonPatternCalibration = CfgGetter.getPublicTool("MuonPatternCalibration"), 
                                                            MuonPatternSegmentMaker = CfgGetter.getPublicTool("MuonPatternSegmentMaker"), 
                                                            MuonTruthSummaryTool = None)
-- 
GitLab