diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
index 9cc511377fd08d80f3d4496ea352b9e745b35f0d..620c5b66e70e9351287803afbf7c8ccc6857393b 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/dbgAnalysis.py
@@ -14,7 +14,7 @@ from TrigConfStorage.TriggerCoolUtil import TriggerCoolUtil
 from TrigConfIO.L1TriggerConfigAccess import L1MenuAccess
 from TrigConfIO.HLTTriggerConfigAccess import HLTMenuAccess
 
-from ROOT import TFile, TH1F
+from ROOT import TFile, TH1F, TTree, vector
 
 import logging
 msg = logging.getLogger("PyJobTransforms." + __name__)
@@ -93,7 +93,7 @@ def dbgPreRun(inputFileList, outputFileList, argdict = None):
     return None, dbAlias
 
 
-def dbgPostRun(inputFile, outputFile, argdict = None):
+def dbgPostRun(inputFile, outputFile, argdict = None, isSplitStream=False):
     msg.info('Running debug_stream analysis PostRun operations on files :{0} '.format(inputFile))
     msg.info('Running debug_stream analysis PostRun, histogram output in :{0} '.format(outputFile))
 
@@ -101,7 +101,10 @@ def dbgPostRun(inputFile, outputFile, argdict = None):
     hfile = TFile(outputFile, 'UPDATE')
 
     # Inicialize dbgEventInfo,  this is the main event analysis class
-    eventInfo = dbgEventInfo('_Pos', inputFile)
+    if isSplitStream:
+        eventInfo = dbgEventInfo('_Pos_Split', inputFile)
+    else:
+        eventInfo = dbgEventInfo('_Pos', inputFile)
     data = []
     l1Info = []
     hltInfo = []
@@ -261,22 +264,164 @@ def getHLTConfigFromArgs(args):
 
     return configKeys
 
-def getHltDecision(rejected, outputFile):
+def getHltDecision(accepted, rejected, outputFile):
     '''
-       Add HLT_rejected_events to outputFile 
+       Add HLT_accepted_events and HLT_rejected_events to outputFile 
     ''' 
 
     # Open root output file
     hfile = TFile(outputFile, 'UPDATE')
     # Define a new histogram called HLT_rejected_events 
     HLT_rejected_events = TH1F("HLT_rejected_events", "HLT_rejected_events", 3, 0.0, 3.0)
+    # Define a new histogram called HLT_accepted_events 
+    HLT_accepted_events = TH1F("HLT_accepted_events", "HLT_accepted_events", 3, 0.0, 3.0)
     
     # Fill the histogram if events are rejected by the HLT 
     # HLT_rejected_events are assigned the value 1
     # If all events are accepted the Histogram is empty 
     HLT_rejected_events.Fill(1, rejected)
     
+    # Fill the histogram if events are accepted by the HLT 
+    # HLT_accepted_events are assigned the value 1
+    # If all events are rejected the Histogram is empty 
+    HLT_accepted_events.Fill(1, accepted)
+    
     # Close output TFile
-    hfile.Write("HLT_rejected_events",TFile.kOverwrite)
+    hfile.Write("", TFile.kOverwrite)
     hfile.Close()
-    return msg.info("Added HLT_rejeceted_events to %s", outputFile)
+    return msg.info("Added HLT_accepted_events and HLT_rejeceted_events to %s", outputFile)
+
+
+
+
+def getPrePosdif_branch(outputFile, hist_name, isVector):
+
+    '''
+       Add Differences_in_Pre_Pos tree to outputFile and Branches Differences_in_Pre_Pos+hist_name 
+    '''
+
+    # Open root output file
+    hfile = TFile(outputFile, 'UPDATE')
+
+    #check Pre/Pos Tree exist
+    if (hfile.Get("Event_Info_Pos") is not None) and (hfile.Get("Event_Info_Pos") is not None):
+
+        #Retrieve Pre Trees - before the Recovery Job has run 
+        tree_Pre = hfile.Get("Event_Info_Pre")
+
+        #Retrieve Post Trees - after the Recovery Job has run 
+        tree_Pos = hfile.Get("Event_Info_Pos")
+
+        #Store the Pre/Pos hist_name values
+        preValues = []
+        posValues = []
+
+        #loop through entries in pre tree 
+        for preEntry in tree_Pre:
+            #retrieve the branch : hist_name 
+            vals_pre = getattr(preEntry, hist_name)
+            # If the branch contains a vector append multiple values per event 
+            if isVector:
+                for i in range(len(vals_pre)):
+                    preValues.append(vals_pre[i])
+            # If the branch is not a vector then append single values
+            else: preValues.append(vals_pre)
+
+        #loop through entries in pos tree 
+        for posEntry in tree_Pos:
+            #retrieve the branch : hist_name 
+            vals_pos = getattr(posEntry, hist_name)
+            # If the branch contains a vector append multiple values per event 
+            if isVector:
+                for i in range(len(vals_pos)):
+                    posValues.append(vals_pos[i])
+            # If the branch is not a vector then append single values
+            else: posValues.append(vals_pos) 
+
+        #store any Values in Pre and not Pos lists
+        differences = []
+        #check if variable is stored as a Vector in outputFile 
+        for value in preValues:
+            #check if the posValues is not empty & is missing values that are in preValues
+            if (len(posValues) != 0) and (value not in posValues):
+                differences.append(value)
+
+        # Check if the Differences_in_Pre_Pos tree already exists in the outputFile
+        if hfile.GetListOfKeys().Contains("Differences_in_Pre_Pos"):
+            #if Differences_in_Pre_Pos tree exists then use this to update with the defined branches 
+            tree_Differences = hfile.Get("Differences_in_Pre_Pos")
+            #Check if the branch "Diff_PrePos_"+hist_name exits 
+            if tree_Differences.GetListOfBranches().Contains("Diff_PrePos_"+hist_name):
+                #if the branch exists then don't proceed with adding it again 
+                msg.info("%s histogram already exists exiting", "Diff_PrePos_"+hist_name)
+                # Close output TFile
+                hfile.Close()
+                return 0 
+            else:
+                msg.info("Difference histogram does not already exists, proceeding with adding %s to the tree : Differences_in_Pre_Pos", "Diff_PrePos_"+hist_name)
+        else: 
+            # If the Differences_in_Pre_Pos tree does not exist then create the tree 
+            tree_Differences = TTree("Differences_in_Pre_Pos", "Differences_in_Pre_Pos")
+
+        # Define the data type depending on the branch type
+        if hist_name=='Stream_Tag_Name' or hist_name=='Stream_Tag_Type' or hist_name=='EventStatusNames' or hist_name=='HLT_Triggered_Names' or hist_name=='L1_Triggered_AV':
+            vec = vector[str]()
+        else: 
+            vec = vector[int]()
+
+        # Define the branch to be added to Differences_in_Pre_Pos tree
+        diffbranch = tree_Differences.Branch("Diff_PrePos_"+hist_name, vec)
+
+        # Fill the branch with the difference values between the Pre and Pos histograms 
+        for val in differences:
+            vec.clear()
+            vec.push_back(val)
+            diffbranch.Fill()
+
+        #Only write out the latest form of the outputFile
+        hfile.Write("Diff_PrePos_"+hist_name, TFile.kOverwrite)
+
+    else:
+        #If a crash has occured and one of the trees does not exist then  
+        #Close output TFile
+        hfile.Close()
+        return msg.info("One of Pre or Post tree's are missing so cannot compare.")
+
+    # Close output TFile
+    hfile.Close()
+
+    return msg.info("Added Diff_PrePos_{0} to {1}".format(hist_name, outputFile))
+
+
+def getPrePosdiff(outputFile):
+    '''
+       Call on getPrePosdif_branch to add Differences_in_Pre_Pos tree and all branches to outputFile 
+    '''
+
+    #create a dictionary that contains info on the branches : stored as vector or not 
+    isVector_Dict = {
+        'L1_Triggered_BP' : True,
+        'L1_Triggered_AV' : True,
+        'L1_Triggered_IDs' : True,
+        'HLT_Triggered_Names' : True,
+        'HLT_Triggered_IDs' : True,
+        'Run_Number' : False,
+        'Stream_Tag_Name' : False,
+        'Stream_Tag_Type' : False,
+        'Lvl1_ID' : False,
+        'Global_ID' : False,
+        'Lumiblock' : False,
+        'Node_ID' : False,
+        'SuperMasterKey' : False,
+        'HLTPrescaleKey' : False,
+        'HLT_Decision' : False,
+        'EventStatusNames' : False,
+    }
+
+    # Add the difference in the pre/pos histograms for each of the branches in the dictionary to the outputFile
+    for branch in isVector_Dict:
+        getPrePosdif_branch(outputFile, branch, isVector_Dict[branch])
+
+    return msg.info("Finished adding Differences_in_Pre_Pos tree to {0}".format(outputFile))
+
+
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
index e26576605e75bfa0416e9546769c8a25021c2efd..9533bacbf7e9f89c80e61304d736107bbb977010 100644
--- a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py
@@ -23,7 +23,7 @@ import TrigTransform.dbgAnalysis as dbgStream
 from TrigTransform.trigTranslate import getTranslated as getTranslated
 
 # Setup logging here
-import logging
+import logging, eformat
 msg = logging.getLogger("PyJobTransforms." + __name__)
 
 # Trig_reco_tf.py executor for BS-BS step (aka running the trigger)
@@ -310,6 +310,8 @@ class trigRecoExecutor(athenaExecutor):
        
         #Count the number of rejected events 
         rejected = 0 
+        #Count the number of accepted events
+        accepted = 0 
        
         try:
             myGen = lineByLine(log, substepName=self._substep)
@@ -346,10 +348,14 @@ class trigRecoExecutor(athenaExecutor):
                                 if 'rejected:' in line and int(line[14]) != 0:
                                     #Add the number of rejected events      
                                     rejected += int(line[14])
+                                # Check for accepted events in log file
+                                if 'accepted:' in line and int(line[14]) != 0:
+                                    #Add the number of accepted events      
+                                    accepted += int(line[14])
             
             if "HIST_DEBUGSTREAMMON" in self.conf.dataDictionary: 
-                # Add the HLT_rejected_events histogram to the output file 
-                dbgStream.getHltDecision(rejected, self.conf.argdict["outputHIST_DEBUGSTREAMMONFile"].value[0])
+                # Add the HLT_accepted_events and HLT_rejected_events histograms to the output file 
+                dbgStream.getHltDecision(accepted, rejected, self.conf.argdict["outputHIST_DEBUGSTREAMMONFile"].value[0])
 
         except OSError as e:
             raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'),
@@ -452,10 +458,21 @@ class trigRecoExecutor(athenaExecutor):
                     argInDict = self.conf.dataDictionary['BS']
                     # If a stream (not All) is selected, then slim the orignal (many stream) BS output to the particular stream
                     if 'streamSelection' in self.conf.argdict and self.conf.argdict['streamSelection'].value[0] != "All":
-                        splitFailed = self._splitBSfile(self.conf.argdict['streamSelection'].value, BSFile, argInDict.value[0])
-                        if(splitFailed):
-                            raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'),
-                                'Did not produce any BS file when selecting stream with trigbs_extractStream.py in file')
+                        splitEmpty = self._splitBSfile(self.conf.argdict['streamSelection'].value, BSFile, argInDict.value[0])
+                        if(splitEmpty):
+                            msg.info('Did not produce any BS file when selecting stream with trigbs_extractStream.py in file')
+                            #If splitEmpty==1, the chosen streams contained no events 
+                            #then run the command to produce an empty BS file and rename it to RAW.pool.root 
+                            #this stops non-zero exit code for rejected events 
+                            cmd_splitFailed = 'trigbs_failedStreamSelection.py ' + BSFile   
+                            msg.info('running command for creating empty file: %s', cmd_splitFailed)
+                            subprocess.call(cmd_splitFailed, shell=True)
+                            #Rename the empty file to "RAW.pool.root" to prevent failure 
+                            #expected filename will be of form: T0debug.runnumber.unknown_debug.unknown.RAW._lb0000._TRF._0001.data
+                            runnumber = eformat.EventStorage.pickDataReader(BSFile).runNumber()
+                            expectedOutputFileName = 'T0debug.00'+str(runnumber)+'.unknown_debug.unknown.RAW._lb0000._TRF._0001.data'
+                            #rename the file to RAW.pool.root, this file will contain 0 events 
+                            self._renamefile(expectedOutputFileName, argInDict.value[0])                     
                     else:
                         msg.info('Stream "All" requested, so not splitting BS file')
                         self._renamefile(BSFile, argInDict.value[0])
@@ -467,6 +484,10 @@ class trigRecoExecutor(athenaExecutor):
         msg.info('Now run athenaExecutor:postExecute')
         super(trigRecoExecutor, self).postExecute()
 
+        # Do debug stream postRun step for BS file that contains events after the streamSelection
+        fileNameDbg = self.conf.argdict["outputHIST_DEBUGSTREAMMONFile"].value
+        dbgStream.dbgPostRun(argInDict.value[0], fileNameDbg[0], self.conf.argdict, isSplitStream=True)
+
 
     def _postExecuteDebug(self, outputBSFile):
         # Run postRun step debug stream analysis if output BS file and output histogram are set
@@ -484,3 +505,6 @@ class trigRecoExecutor(athenaExecutor):
         
         # Do debug stream postRun step
         dbgStream.dbgPostRun(outputBSFile, fileNameDbg[0], self.conf.argdict)
+
+        # Call Pre Pos histogram differenece function
+        dbgStream.getPrePosdiff(fileNameDbg[0])
diff --git a/MuonSpectrometer/MuonPhaseII/MuonCnv/xAODMuonSimHitCnv/src/xAODSimHitToTgcMeasCnvAlg.cxx b/MuonSpectrometer/MuonPhaseII/MuonCnv/xAODMuonSimHitCnv/src/xAODSimHitToTgcMeasCnvAlg.cxx
index cf467ec7174318c0db5fe7df0008dea076c8f6c4..71799b4a4c14a55d7249509a6545e738aac496a3 100644
--- a/MuonSpectrometer/MuonPhaseII/MuonCnv/xAODMuonSimHitCnv/src/xAODSimHitToTgcMeasCnvAlg.cxx
+++ b/MuonSpectrometer/MuonPhaseII/MuonCnv/xAODMuonSimHitCnv/src/xAODSimHitToTgcMeasCnvAlg.cxx
@@ -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
 */
 
 #include "xAODSimHitToTgcMeasCnvAlg.h"
@@ -14,10 +14,6 @@
 // Random Numbers
 #include <AthenaKernel/RNGWrapper.h>
 
-namespace {
-    constexpr double invC = 1./ Gaudi::Units::c_light;
-}
-
 xAODSimHitToTgcMeasCnvAlg::xAODSimHitToTgcMeasCnvAlg(const std::string& name, 
                                                      ISvcLocator* pSvcLocator):
         AthReentrantAlgorithm{name, pSvcLocator} {}
diff --git a/MuonSpectrometer/MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h b/MuonSpectrometer/MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h
index 57c6bbbdbed847f2a6fba98c9d0f83c0aad72be2..113cd8f44604403d1db3ae414e6b98ac8bf0d66d 100644
--- a/MuonSpectrometer/MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h
+++ b/MuonSpectrometer/MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/sTgcReadoutElement.h
@@ -1,12 +1,11 @@
 /*
-  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 MUONREADOUTGEOMETRYR4_STGCREADOUTELEMENT_H
 #define MUONREADOUTGEOMETRYR4_STGCREADOUTELEMENT_H
 
 #include <MuonReadoutGeometryR4/MuonReadoutElement.h>
 #include <MuonReadoutGeometryR4/StripDesign.h>
-//#include <MuonReadoutGeometryR4/DiamondStripDesign.h>
 #include <MuonReadoutGeometryR4/StripLayer.h>
 #ifndef SIMULATIONBASE
 #   include "Acts/Surfaces/TrapezoidBounds.hpp"
@@ -188,7 +187,6 @@ class sTgcReadoutElement : public MuonReadoutElement {
 
         /// Auxillary variables to translate the Identifier to a measurement hash and back
         const unsigned int m_hashShiftChType{2*CxxUtils::count_ones(static_cast<unsigned int>(numLayers()))};
-        const unsigned int m_hashShiftChannel{2*m_hashShiftChType};
 };
 
 std::ostream& operator<<(
diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/DCubeHistograms.py b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/DCubeHistograms.py
index d45c56f661f4bfc490307a156ca533fe17ffd840..e5160b302bbd2e294d5112d8879d69d3f64531d0 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/DCubeHistograms.py
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/DCubeHistograms.py
@@ -20,7 +20,7 @@ class MyHistoFiller(object):
     rpcGlobalX = ROOT.TH1F("rpcGlobalX","rpcGlobalX;RPC_SIM_hitGlobalPositionX",100,-15000,15000)
     rpcGlobalY = ROOT.TH1F("rpcGlobalY","rpcGlobalY;RPC_SIM_hitGlobalPositionY",100,-15000,15000)
     rpcGlobalZ = ROOT.TH1F("rpcGlobalZ","rpcGlobalZ;RPC_SIM_hitGlobalPositionZ",100,-15000,15000)
-    rpcGasGap = ROOT.TH1F("rpcGasGap","rpcGasGap;RPC_SIM_gasGap",4,0,4)
+    rpcGasGap = ROOT.TH1F("rpcGasGap","rpcGasGap;RPC_SIM_GasGap",4,0,4)
     
     # RPC Digit Histograms (all stations)
     rpcDigitlocalX = ROOT.TH1F("rpcDigitlocalX","rpcDigitlocalX;Digits_RPC_localPosX [mm]",100,-1200,1200)
@@ -30,7 +30,7 @@ class MyHistoFiller(object):
     rpcDigitglobalX = ROOT.TH1F("rpcDigitglobalX","rpcDigitglobalX;Digits_RPC_globalPosX [mm]",100,-13000,12000)
     rpcDigitglobalY = ROOT.TH1F("rpcDigitglobalY","rpcDigitglobalY;Digits_RPC_globalPosY [mm]",100,-15000,15000)
     rpcDigitglobalZ = ROOT.TH1F("rpcDigitglobalZ","rpcDigitglobalZ;Digits_RPC_globalPosZ [mm]",100,-15000,15000)
-    rpcDigitGasGap = ROOT.TH1F("rpcDigitGasGap","rpcDigitGasGap;Digits_RPC_gas_gap",5,0,5)
+    rpcDigitGasGap = ROOT.TH1F("rpcDigitGasGap","rpcDigitGasGap;Digits_RPC_GasGap",5,0,5)
     rpcDigitdoubletR = ROOT.TH1F("rpcDigitdoubletR","rpcDigitdoubletR;Digits_RPC_doubletR",4,0,4)
     rpcDigitdoubletZ = ROOT.TH1F("rpcDigitdoubletZ","rpcDigitdoubletZ;Digits_RPC_doubletZ",4,0,4)
     rpcDigitdoubletPhi = ROOT.TH1F("rpcDigitdoubletPhi","rpcDigitdoubletPhi;Digits_RPC_doubletPhi",4,0,4)
@@ -54,7 +54,7 @@ class MyHistoFiller(object):
     bis_rpcDigitglobalX = ROOT.TH1F("bis_rpcDigitglobalX","bis_rpcDigitglobalX;Digits_bis_RPC_globalPosX [mm]",100,-5000,5000)
     bis_rpcDigitglobalY = ROOT.TH1F("bis_rpcDigitglobalY","bis_rpcDigitglobalY;Digits_bis_RPC_globalPosY [mm]",100,-5000,5000)
     bis_rpcDigitglobalZ = ROOT.TH1F("bis_rpcDigitglobalZ","bis_rpcDigitglobalZ;Digits_bis_RPC_globalPosZ [mm]",100,-10000,10000)
-    bis_rpcDigitGasGap = ROOT.TH1F("bis_rpcDigitGasGap","bis_rpcDigitGasGap;Digits_bis_RPC_gas_gap",5,0,5)
+    bis_rpcDigitGasGap = ROOT.TH1F("bis_rpcDigitGasGap","bis_rpcDigitGasGap;Digits_bis_RPC_GasGap",5,0,5)
     bis_rpcDigitdoubletR = ROOT.TH1F("bis_rpcDigitdoubletR","bis_rpcDigitdoubletR;Digits_bis_RPC_doubletR",4,0,4)
     bis_rpcDigitdoubletZ = ROOT.TH1F("bis_rpcDigitdoubletZ","bis_rpcDigitdoubletZ;Digits_bis_RPC_doubletZ",4,0,4)
     bis_rpcDigitdoubletPhi = ROOT.TH1F("bis_rpcDigitdoubletPhi","bis_rpcDigitdoubletPhi;Digits_bis_RPC_doubletPhi",4,0,4)
@@ -194,7 +194,7 @@ class MyHistoFiller(object):
     tgcGlobalX = ROOT.TH1F("tgcGlobalX","tgcGlobalX;TGC_Sim_hitGlobalPositionX",100,-12000,12000)
     tgcGlobalY = ROOT.TH1F("tgcGlobalY","tgcGlobalY;TGC_Sim_hitGlobalPositionY",100,-12000,12000)
     tgcGlobalZ = ROOT.TH1F("tgcGlobalZ","tgcGlobalZ;TGC_Sim_hitGlobalPositionZ",100,-20000,20000)
-    tgcGasGap = ROOT.TH1F("tgcGasGap","tgcGasGap;TGC_Sim_gasGap",4,0,4)
+    tgcGasGap = ROOT.TH1F("tgcGasGap","tgcGasGap;TGC_Sim_GasGap",4,0,4)
     tgcChannel = ROOT.TH1F("tgcChannel","tgcChannel;TGC_Sim_channel",3,0,3)
     tgcGlobalTime = ROOT.TH1F("tgcGlobalTime","tgcGlobalTime;TGC_sim_globalTime",100,0,500)
     tgcKineticEnergy = ROOT.TH1F("tgcKineticEnergy","tgcKineticEnergy;TGC_Sim_kineticEnergy",100,0,400000)
@@ -212,7 +212,7 @@ class MyHistoFiller(object):
     # TGC SDO Histograms
     TGCSDOStationEta = ROOT.TH1F("TGCSDOStationEta","TGCSDOStationEta;SDO_TGC_stationEta",12,-6,6)
     TGCSDOStationPhi = ROOT.TH1F("TGCSDOStationPhi","TGCSDOStationPhi;SDO_TGC_stationPhi",50,0,50)
-    TGCSDOGasgap = ROOT.TH1F("TGCSDOGasgap","TGCSDOGasgap;SDO_TGC_GasGap",4,0,4)
+    TGCSDOGasGap = ROOT.TH1F("TGCSDOGasGap","TGCSDOGasGap;SDO_TGC_GasGap",4,0,4)
     TGCSDOChannel = ROOT.TH1F("TGCSDOChannel","TGCSDOChannel;SDO_TGC_channel",100,0,150)
     TGCSDOWord = ROOT.TH1F("TGCSDOWord","TGCSDOWord;SDO_TGC_word",4,-2,2)
     TGCSDOBarcode = ROOT.TH1F("TGCSDOBarcode","TGCSDOBarcode;SDO_TGC_barcode",100,0,200000) 
@@ -225,7 +225,7 @@ class MyHistoFiller(object):
     # TGC RDO Histograms
     TGCRDOStationEta = ROOT.TH1F("TGCRDOStationEta","TGCRDOStationEta;RDO_TGC_stationEta",12,-6,6)
     TGCRDOStationPhi = ROOT.TH1F("TGCRDOStationPhi","TGCRDOStationPhi;RDO_TGC_stationPhi",50,0,50)
-    TGCRDOGasgap = ROOT.TH1F("TGCRDOGasgap","TGCRDOGasgap;RDO_TGC_GasGap",3,0,3)
+    TGCRDOGasGap = ROOT.TH1F("TGCRDOGasGap","TGCRDOGasGap;RDO_TGC_GasGap",3,0,3)
     TGCRDOChannel = ROOT.TH1F("TGCRDOChannel","TGCRDOChannel;RDO_TGC_channel",3,0,3)
     TGCRDOGlobalX = ROOT.TH1F("TGCRDOGlobalX","TGCRDOGlobalX;RDO_TGC_globalPosX",100,-10000,10000)
     TGCRDOGlobalY = ROOT.TH1F("TGCRDOGlobalY","TGCRDOGlobalY;RDO_TGC_globalPosY",100,-10000,10000)
@@ -234,7 +234,7 @@ class MyHistoFiller(object):
     # TGC PRD Histograms
     TGCPRDStationEta = ROOT.TH1F("TGCPRDStationEta","TGCPRDStationEta;PRD_TGC_stationEta",12,-6,6)
     TGCPRDStationPhi = ROOT.TH1F("TGCPRDStationPhi","TGCPRDStationPhi;PRD_TGC_stationPhi",50,0,50)
-    TGCPRDGasgap = ROOT.TH1F("TGCPRDGasgap","TGCPRDGasgap;PRD_TGC_gas_gap",4,0,4)
+    TGCPRDGasGap = ROOT.TH1F("TGCPRDGasGap","TGCPRDGasGap;PRD_TGC_GasGap",4,0,4)
     TGCPRDChannel = ROOT.TH1F("TGCPRDChannel","TGCPRDChannel;PRD_TGC_channel",100,0,150)
     TGCPRDisStrip = ROOT.TH1F("TGCPRDisStrip","TGCPRDisStrip;PRD_TGC_isStrip",2,0,2) 
     TGCPRDGlobalX = ROOT.TH1F("TGCPRDGlobalX","TGCPRDGlobalX;PRD_TGC_globalPosX",100,-15000,15000)
@@ -289,7 +289,7 @@ class MyHistoFiller(object):
                 MyHistoFiller.rpcGlobalX.Fill(TTree.RPC_SIM_GlobalPositionX[n])
                 MyHistoFiller.rpcGlobalY.Fill(TTree.RPC_SIM_GlobalPositionY[n])
                 MyHistoFiller.rpcGlobalZ.Fill(TTree.RPC_SIM_GlobalPositionZ[n])
-                MyHistoFiller.rpcGasGap.Fill(ord(TTree.RPC_SIM_gasGap[n]))
+                MyHistoFiller.rpcGasGap.Fill(ord(TTree.RPC_SIM_GasGap[n]))
                 
         if self.__chamber_name == "RPC_Digit":
             if not (self.__eta_sel(TTree) and self.__sector_sel(TTree)):
@@ -302,7 +302,7 @@ class MyHistoFiller(object):
                 MyHistoFiller.rpcDigitglobalX.Fill(TTree.Digits_RPC_globalPosX[n])
                 MyHistoFiller.rpcDigitglobalY.Fill(TTree.Digits_RPC_globalPosY[n])
                 MyHistoFiller.rpcDigitglobalZ.Fill(TTree.Digits_RPC_globalPosZ[n])
-                MyHistoFiller.rpcDigitGasGap.Fill(ord(TTree.Digits_RPC_gasGap[n]))
+                MyHistoFiller.rpcDigitGasGap.Fill(ord(TTree.Digits_RPC_GasGap[n]))
                 MyHistoFiller.rpcDigitdoubletR.Fill(ord(TTree.Digits_RPC_doubletR[n]))
                 MyHistoFiller.rpcDigitdoubletZ.Fill(ord(TTree.Digits_RPC_doubletZ[n]))
                 MyHistoFiller.rpcDigitdoubletPhi.Fill(ord(TTree.Digits_RPC_doubletPhi[n]))
@@ -343,7 +343,7 @@ class MyHistoFiller(object):
                     MyHistoFiller.bis_rpcDigitglobalX.Fill(TTree.Digits_RPC_globalPosX[n])
                     MyHistoFiller.bis_rpcDigitglobalY.Fill(TTree.Digits_RPC_globalPosY[n])
                     MyHistoFiller.bis_rpcDigitglobalZ.Fill(TTree.Digits_RPC_globalPosZ[n])
-                    MyHistoFiller.bis_rpcDigitGasGap.Fill(ord(TTree.Digits_RPC_gasGap[n]))
+                    MyHistoFiller.bis_rpcDigitGasGap.Fill(ord(TTree.Digits_RPC_GasGap[n]))
                     MyHistoFiller.bis_rpcDigitdoubletR.Fill(ord(TTree.Digits_RPC_doubletR[n]))
                     MyHistoFiller.bis_rpcDigitdoubletZ.Fill(ord(TTree.Digits_RPC_doubletZ[n]))
                     MyHistoFiller.bis_rpcDigitdoubletPhi.Fill(ord(TTree.Digits_RPC_doubletPhi[n]))
@@ -531,7 +531,7 @@ class MyHistoFiller(object):
             else:
                 MyHistoFiller.TGCSDOStationEta.Fill(MyHistoFiller.Eta(ord(TTree.SDO_TGC_stationEta[n])))
                 MyHistoFiller.TGCSDOStationPhi.Fill(ord(TTree.SDO_TGC_stationPhi[n]))
-                MyHistoFiller.TGCSDOGasgap.Fill(ord(TTree.SDO_TGC_GasGap[n]))
+                MyHistoFiller.TGCSDOGasGap.Fill(ord(TTree.SDO_TGC_GasGap[n]))
                 MyHistoFiller.TGCSDOChannel.Fill(ord(TTree.SDO_TGC_channel[n]))
                 MyHistoFiller.TGCSDOWord.Fill(TTree.SDO_TGC_word[n])
                 MyHistoFiller.TGCSDOBarcode.Fill(TTree.SDO_TGC_barcode[n])
@@ -548,7 +548,7 @@ class MyHistoFiller(object):
             else:
                 MyHistoFiller.TGCRDOStationEta.Fill(MyHistoFiller.Eta(ord(TTree.RDO_TGC_stationEta[n])))
                 MyHistoFiller.TGCRDOStationPhi.Fill(ord(TTree.RDO_TGC_stationPhi[n]))
-                MyHistoFiller.TGCRDOGasgap.Fill(ord(TTree.RDO_TGC_GasGap[n]))
+                MyHistoFiller.TGCRDOGasGap.Fill(ord(TTree.RDO_TGC_GasGap[n]))
                 MyHistoFiller.TGCRDOChannel.Fill(ord(TTree.RDO_TGC_channel[n]))
                 MyHistoFiller.TGCRDOGlobalX.Fill(TTree.RDO_TGC_globalPosX[n])
                 MyHistoFiller.TGCRDOGlobalY.Fill(TTree.RDO_TGC_globalPosY[n])
@@ -561,7 +561,7 @@ class MyHistoFiller(object):
             else:
                 MyHistoFiller.TGCPRDStationEta.Fill(MyHistoFiller.Eta(ord(TTree.PRD_TGC_stationEta[n])))
                 MyHistoFiller.TGCPRDStationPhi.Fill(ord(TTree.PRD_TGC_stationPhi[n]))
-                MyHistoFiller.TGCPRDGasgap.Fill(ord(TTree.PRD_TGC_gasGap[n]))
+                MyHistoFiller.TGCPRDGasGap.Fill(ord(TTree.PRD_TGC_GasGap[n]))
                 MyHistoFiller.TGCPRDChannel.Fill(ord(TTree.PRD_TGC_channel[n]))
                 MyHistoFiller.TGCPRDisStrip.Fill(TTree.PRD_TGC_isStrip[n])
                 MyHistoFiller.TGCPRDGlobalX.Fill(TTree.PRD_TGC_globalPosX[n])
@@ -795,7 +795,7 @@ class MyHistoFiller(object):
         if self.__chamber_name == "TGC_SDO":
             outdir.WriteTObject(MyHistoFiller.TGCSDOStationEta, MyHistoFiller.TGCSDOStationEta.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCSDOStationPhi, MyHistoFiller.TGCSDOStationPhi.GetName())
-            outdir.WriteTObject(MyHistoFiller.TGCSDOGasgap, MyHistoFiller.TGCSDOGasgap.GetName())
+            outdir.WriteTObject(MyHistoFiller.TGCSDOGasGap, MyHistoFiller.TGCSDOGasGap.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCSDOChannel, MyHistoFiller.TGCSDOChannel.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCSDOWord, MyHistoFiller.TGCSDOWord.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCSDOBarcode, MyHistoFiller.TGCSDOBarcode.GetName())
@@ -809,7 +809,7 @@ class MyHistoFiller(object):
         if self.__chamber_name == "TGC_RDO":
             outdir.WriteTObject(MyHistoFiller.TGCRDOStationEta, MyHistoFiller.TGCRDOStationEta.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCRDOStationPhi, MyHistoFiller.TGCRDOStationPhi.GetName())
-            outdir.WriteTObject(MyHistoFiller.TGCRDOGasgap, MyHistoFiller.TGCRDOGasgap.GetName())
+            outdir.WriteTObject(MyHistoFiller.TGCRDOGasGap, MyHistoFiller.TGCRDOGasGap.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCRDOChannel, MyHistoFiller.TGCRDOChannel.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCRDOGlobalX, MyHistoFiller.TGCRDOGlobalX.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCRDOGlobalY, MyHistoFiller.TGCRDOGlobalY.GetName())
@@ -819,7 +819,7 @@ class MyHistoFiller(object):
         if self.__chamber_name == "TGC_PRD":
             outdir.WriteTObject(MyHistoFiller.TGCPRDStationEta, MyHistoFiller.TGCPRDStationEta.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCPRDStationPhi, MyHistoFiller.TGCPRDStationPhi.GetName())
-            outdir.WriteTObject(MyHistoFiller.TGCPRDGasgap, MyHistoFiller.TGCPRDGasgap.GetName())
+            outdir.WriteTObject(MyHistoFiller.TGCPRDGasGap, MyHistoFiller.TGCPRDGasGap.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCPRDChannel, MyHistoFiller.TGCPRDChannel.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCPRDisStrip, MyHistoFiller.TGCPRDisStrip.GetName())
             outdir.WriteTObject(MyHistoFiller.TGCPRDGlobalX, MyHistoFiller.TGCPRDGlobalX.GetName())
diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeDigitHistograms.py b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeDigitHistograms.py
index 87ffcfab034bbe0a859a25b49df41acec410c9ea..a10f8e737f247f9c60d162cd4512d8de4b18383f 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeDigitHistograms.py
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeDigitHistograms.py
@@ -57,7 +57,7 @@ if __name__ == "__main__":
     rpcglobalX = ROOT.TH1F("rpcglobalX","rpcglobalX;Digits_RPC_globalPosX [mm]",100,-13000,12000)
     rpcglobalY = ROOT.TH1F("rpcglobalY","rpcglobalY;Digits_RPC_globalPosY [mm]",100,-15000,14000)
     rpcglobalZ = ROOT.TH1F("rpcglobalZ","rpcglobalZ;Digits_RPC_globalPosZ [mm]",100,-15000,15000)
-    rpcGasGap = ROOT.TH1F("rpcGasGap","rpcGasGap;Digits_RPC_gas_gap",5,0,5)
+    rpcGasGap = ROOT.TH1F("rpcGasGap","rpcGasGap;Digits_RPC_GasGap",5,0,5)
     rpcdoubletR = ROOT.TH1F("rpcdoubletR","rpcdoubletR;Digits_RPC_doubletR",4,0,4)
     rpcdoubletZ = ROOT.TH1F("rpcdoubletZ","rpcdoubletZ;Digits_RPC_doubletZ",4,0,4)
     rpcdoubletPhi = ROOT.TH1F("rpcdoubletPhi","rpcdoubletPhi;Digits_RPC_doubletPhi",4,0,4)
@@ -82,7 +82,7 @@ if __name__ == "__main__":
     bis_rpcglobalX = ROOT.TH1F("bis_rpcglobalX","bis_rpcglobalX;Digits_bis_rpc_globalPosX [mm]",100,-5000,5000)
     bis_rpcglobalY = ROOT.TH1F("bis_rpcglobalY","bis_rpcglobalY;Digits_bis_rpc_globalPosY [mm]",100,-5000,5000)
     bis_rpcglobalZ = ROOT.TH1F("bis_rpcglobalZ","bis_rpcglobalZ;Digits_bis_rpc_globalPosZ [mm]",100,-10000,10000)
-    bis_rpcGasGap = ROOT.TH1F("bis_rpcGasGap","bis_rpcGasGap;Digits_bis_rpc_gas_gap",5,0,5)
+    bis_rpcGasGap = ROOT.TH1F("bis_rpcGasGap","bis_rpcGasGap;Digits_bis_rpc_GasGap",5,0,5)
     bis_rpcdoubletR = ROOT.TH1F("bis_rpcdoubletR","bis_rpcdoubletR;Digits_bis_rpc_doubletR",4,0,4)
     bis_rpcdoubletZ = ROOT.TH1F("bis_rpcdoubletZ","bis_rpcdoubletZ;Digits_bis_rpc_doubletZ",4,0,4)
     bis_rpcdoubletPhi = ROOT.TH1F("bis_rpcdoubletPhi","bis_rpcdoubletPhi;Digits_bis_rpc_doubletPhi",4,0,4)
@@ -165,7 +165,7 @@ if __name__ == "__main__":
                 rpcglobalX.Fill(inputTree.Digits_RPC_globalPosX[nrpcHit])
                 rpcglobalY.Fill(inputTree.Digits_RPC_globalPosY[nrpcHit])
                 rpcglobalZ.Fill(inputTree.Digits_RPC_globalPosZ[nrpcHit])
-                rpcGasGap.Fill(inputTree.Digits_RPC_gas_gap[nrpcHit])
+                rpcGasGap.Fill(inputTree.Digits_RPC_GasGap[nrpcHit])
                 rpcdoubletR.Fill(inputTree.Digits_RPC_doubletR[nrpcHit])
                 rpcdoubletZ.Fill(inputTree.Digits_RPC_doubletZ[nrpcHit])
                 rpcdoubletPhi.Fill(inputTree.Digits_RPC_doubletPhi[nrpcHit])
@@ -206,7 +206,7 @@ if __name__ == "__main__":
                     bis_rpcglobalX.Fill(inputTree.Digits_RPC_globalPosX[nrpcHit])
                     bis_rpcglobalY.Fill(inputTree.Digits_RPC_globalPosY[nrpcHit])
                     bis_rpcglobalZ.Fill(inputTree.Digits_RPC_globalPosZ[nrpcHit])
-                    bis_rpcGasGap.Fill(inputTree.Digits_RPC_gas_gap[nrpcHit])
+                    bis_rpcGasGap.Fill(inputTree.Digits_RPC_GasGap[nrpcHit])
                     bis_rpcdoubletR.Fill(inputTree.Digits_RPC_doubletR[nrpcHit])
                     bis_rpcdoubletZ.Fill(inputTree.Digits_RPC_doubletZ[nrpcHit])
                     bis_rpcdoubletPhi.Fill(inputTree.Digits_RPC_doubletPhi[nrpcHit])
diff --git a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeHistograms.py b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeHistograms.py
index 7db6d52a22df5b383672210a4d5123225c7784ca..c06c40930c08868ad933c7624e9144be2f082b50 100644
--- a/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeHistograms.py
+++ b/MuonSpectrometer/MuonValidation/MuonPRDTest/scripts/createDCubeHistograms.py
@@ -60,7 +60,7 @@ if __name__ == "__main__":
     rpcGlobalZ = ROOT.TH1F("rpcGlobalZ","rpcGlobalZ;RPC_hitGlobalPositionZ",100,-15000,15000)
     rpcGlobalR = ROOT.TH1F("rpcGlobalR","rpcGlobalR;RPC_hitGlobalPositionR",100,4000,14000)
     rpcGlobalP = ROOT.TH1F("rpcGlobalP","rpcGlobalP;RPC_hitGlobalPositionP",100,-3.6,3.6)
-    rpcGasGap = ROOT.TH1F("rpcGasGap","rpcGasGap;RPC_Sim_gasGapLayer",3,0,3)
+    rpcGasGap = ROOT.TH1F("rpcGasGap","rpcGasGap;RPC_Sim_GasGapLayer",3,0,3)
     #############################################################################
     # MDTs
     mdtLocalX = ROOT.TH1F("mdtLocalX","mdtLocalX;MDT_hitLocalPositionX",100,-16,16)
@@ -104,7 +104,7 @@ if __name__ == "__main__":
     tgcGlobalZ = ROOT.TH1F("tgcGlobalZ","tgcGlobalZ;TGC_hitGlobalPositionZ",100,-18000,18000)
     tgcGlobalR = ROOT.TH1F("tgcGlobalR","tgcGlobalR;TGC_hitGlobalPositionR",100,1000,13000)
     tgcGlobalP = ROOT.TH1F("tgcGlobalP","tgcGlobalP;TGC_hitGlobalPositionP",100,-3.6,3.6)
-    tgcGasGap = ROOT.TH1F("tgcGasGap","tgcGasGap;TGC_gasGap",4,0,4)
+    tgcGasGap = ROOT.TH1F("tgcGasGap","tgcGasGap;TGC_GasGap",4,0,4)
     tgcChannel = ROOT.TH1F("tgcChannel","tgcChannel;TGC_channel",3,0,3)
     tgcGlobalTime = ROOT.TH1F("tgcGlobalTime","tgcGlobalTime;TGC_globalTime",100,0,120)
     tgcKineticEnergy = ROOT.TH1F("tgcKineticEnergy","tgcKineticEnergy;TGC_kineticEnergy",100,0,400000)
@@ -146,7 +146,7 @@ if __name__ == "__main__":
             rpcGlobalZ.Fill(inputTree.RPC_hitGlobalPositionZ[nrpcHit])
             rpcGlobalR.Fill(inputTree.RPC_hitGlobalPositionR[nrpcHit])
             rpcGlobalP.Fill(inputTree.RPC_hitGlobalPositionP[nrpcHit])
-            rpcGasGap.Fill(inputTree.RPC_Sim_gasGapLayer[nrpcHit])
+            rpcGasGap.Fill(inputTree.RPC_Sim_GasGapLayer[nrpcHit])
 # MDT
         for nmdtHit in range(0,len(inputTree.MDT_hitLocalPositionX)):
             mdtLocalX.Fill(inputTree.MDT_hitLocalPositionX[nmdtHit])
@@ -190,7 +190,7 @@ if __name__ == "__main__":
             tgcGlobalZ.Fill(inputTree.TGC_hitGlobalPositionZ[ntgcHit])
             tgcGlobalR.Fill(inputTree.TGC_hitGlobalPositionR[ntgcHit])
             tgcGlobalP.Fill(inputTree.TGC_hitGlobalPositionP[ntgcHit])
-            tgcGasGap.Fill(inputTree.TGC_gasGap[ntgcHit])
+            tgcGasGap.Fill(inputTree.TGC_GasGap[ntgcHit])
             tgcChannel.Fill(inputTree.TGC_channel[ntgcHit])
             tgcGlobalTime.Fill(inputTree.TGC_globalTime[ntgcHit])
             tgcKineticEnergy.Fill(inputTree.TGC_kineticEnergy[ntgcHit])
diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasEffMonitoring.py b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasEffMonitoring.py
index 1079aee0f327c9596fa2e549c225d42e364c7c3e..df2d40b9244ce77c362acefafc20878b9b2b9097 100644
--- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasEffMonitoring.py
+++ b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/python/TrigMinBiasEffMonitoring.py
@@ -146,7 +146,7 @@ def TrigMinBiasEff(flags):
             s = name.split("_")
             return "_".join(s[:3] + s[4:])
 
-        triggerAndRef += [_c(name, _dropsup(name), level, xmin=_trk(name) - 20, xmax=_trk(name) + 50) for name, level in pusupChains]
+        triggerAndRef += [_c(chain[0], _dropsup(chain[0]), chain[1], xmin=_trk(chain) - 20, xmax=_trk(chain) + 50) for chain in pusupChains]
 
     # monitor exclusivity cut
     exclChains = getMinBiasChains(monAccess, '(excl)')
diff --git a/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_failedStreamSelection.py b/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_failedStreamSelection.py
new file mode 100755
index 0000000000000000000000000000000000000000..1e7ff20abc057d914416bf9b3bd4bf536d1b70e5
--- /dev/null
+++ b/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_failedStreamSelection.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env tdaq_python 
+
+# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
+
+# Create an empty outfile if no events are selected for a given stream name in trigbs_extractStream.py
+
+import sys
+
+def empty_writer():
+    """Creates an empty BSfile"""
+
+    import eformat
+    #retrieve input BSFile and corresponding runNumber 
+    inputFile = sys.argv[1]
+    runnumber = eformat.EventStorage.pickDataReader(inputFile).runNumber()
+    #create the empty BSFile with the name: 'T0debug.runnumber.unknown_debug.unknown.RAW._lb0000._TRF._0001.data'
+    of = eformat.EventStorage.RawFileName('T0debug',runnumber,'unknown','debug',0,'TRF','unknown')
+    eformat.ostream(directory='.', core_name=of.fileNameCore())
+    sys.exit(0)
+
+if __name__ == "__main__":
+    empty_writer()