From 6a8e410f501a84a0e0213f30710deee893e10b3b Mon Sep 17 00:00:00 2001
From: Vladimir Lyubushkin <Vladimir.Lyubushkin@cern.ch>
Date: Wed, 10 Feb 2021 13:15:25 +0100
Subject: [PATCH 1/5] fix bug in MuonChainFilterAlg

---
 .../TrigMuonEF/src/MuonChainFilterAlg.cxx     | 157 +++++++++---------
 .../TrigMuonEF/src/MuonChainFilterAlg.h       |  54 +++---
 .../python/HLTMenuConfig/Muon/MuonDef.py      |   4 +-
 3 files changed, 103 insertions(+), 112 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.cxx b/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.cxx
index 3110d9bcd2a3..73fc97ff71cc 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.cxx
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.cxx
@@ -1,111 +1,106 @@
 /*
-  Filter chains for muon trigger algorithms. Designed to pass if at least one active chain is not in the list to be filtered.
-  
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonChainFilterAlg.h"
-#include "TrigCompositeUtils/HLTIdentifier.h"
+#include "TrigCompositeUtils/TrigCompositeUtils.h"
 #include "xAODTrigMuon/L2CombinedMuonAuxContainer.h"
 #include "xAODTrigMuon/L2StandAloneMuonAuxContainer.h"
 
-MuonChainFilterAlg::MuonChainFilterAlg(const std::string& name, ISvcLocator* pSvcLocator )
-:AthAlgorithm(name, pSvcLocator)
-{
 
+MuonChainFilterAlg::MuonChainFilterAlg(const std::string& name, ISvcLocator* pSvcLocator)
+    : ::AthAlgorithm(name, pSvcLocator) {}
 
-}
 
-StatusCode MuonChainFilterAlg::initialize(){
+StatusCode MuonChainFilterAlg::initialize() {
+
+  ATH_CHECK( m_inputDecisionKeys.initialize() );
+  ATH_CHECK( m_muCombKey.initialize(m_writeL2muComb) );
+  ATH_CHECK( m_muFastKey.initialize(m_writeL2muFast) );
 
-  ATH_CHECK(m_inputDecisionKeys.initialize());
-  ATH_CHECK(m_muCombKey.initialize(m_writeL2muComb));
-  ATH_CHECK(m_muFastKey.initialize(m_writeL2muFast));
-  if ( m_filterChains.size()!=0 ) {
-    for (size_t i=0; i<m_filterChains.size(); ++i) {
-      ATH_MSG_DEBUG("IO TEST: " << i << " filter chains >> " << m_filterChains[i]);
+  // convert chain names into hashes
+  if (!m_filterChains.empty()) {
+    for (size_t i = 0; i < m_filterChains.size(); ++i) {
+      const auto id = HLT::Identifier(m_filterChains[i]);
+      m_filterChainIDs.insert(id.numeric());
+      ATH_MSG_DEBUG( i << " filter chain >> " << m_filterChains[i] );
     }
   }
   return StatusCode::SUCCESS;
 }
 
-StatusCode MuonChainFilterAlg::finalize()
-{
-  ATH_MSG_DEBUG("Finalization");
 
-  return StatusCode::SUCCESS;
-}
+StatusCode MuonChainFilterAlg::execute() {
 
-StatusCode MuonChainFilterAlg::execute()
-{
+  // check if there is anything in the filter list
+  if (m_filterChains.empty()) {
+    ATH_MSG_DEBUG( "Nothing to filter, pass = " << (m_notGate ? "false" : "true") );
 
-  bool pass = false;
-  //First check if there is anything in the filter list
-  if(!m_notGate && m_filterChains.size()==0){
-    ATH_MSG_DEBUG("Nothing to filter");
-    setFilterPassed(true);
+    if (m_notGate) {
+      ATH_CHECK( createDummyMuonContainers() );
+    }
+    setFilterPassed(!m_notGate);
     return StatusCode::SUCCESS;
   }
 
-  //get input decisions (from output of input maker)
-  for(auto inputKey : m_inputDecisionKeys){
-    auto inputHandle = SG::makeHandle(inputKey);
-    if(inputHandle.isValid()){
-      auto inputs = inputHandle.ptr();
-      ATH_MSG_DEBUG("Checking inputHandle "<<inputHandle.key()<<" with size: "<<inputs->size());
-      for(size_t i=0; i < inputs->size(); i++){
-	const TrigCompositeUtils::Decision* dec = inputs->at(i);
-	TrigCompositeUtils::DecisionIDContainer decIDs;
-	TrigCompositeUtils::decisionIDs(dec, decIDs);
-	for( auto id : decIDs){
-	  //get name of decisions to determine active chains
-	  //and compare to the chains on list to be
-	  std::string chainName = HLT::Identifier(id).name();
-	  auto it = find(m_filterChains.begin(), m_filterChains.end(), chainName);
-	  //if there is any chain that is active and not on 
-	  //the filter list, set the filter to pass
-	  if(!m_notGate) {
-	    if(it != m_filterChains.end()) {
-	      ATH_MSG_DEBUG("chain "<<chainName<<" is on the filter list, keep looking");
-	    }
-	    else {
-	      ATH_MSG_DEBUG("chain "<<chainName<<" is not on the filter list. Passing");
-	      pass = true;
-	      setFilterPassed(pass);
-	      return StatusCode::SUCCESS;
-	    }
-	  }
-	  else {
-	    if(it != m_filterChains.end()) {
-	      ATH_MSG_DEBUG("chain "<<chainName<<" is on the not-filter list, Passing");
-	      pass = true;
-	      setFilterPassed(pass);
-	      return StatusCode::SUCCESS;
-	    }
-	    else{
-	      ATH_MSG_DEBUG("chain "<<chainName<<" is not on the not-filter list. keep looking");
-	    }
-	  }
-	}
+  // get input decisions (from output of input maker)
+  for (auto inputKey : m_inputDecisionKeys) {
+    auto inputDecisions = SG::makeHandle(inputKey);
+    ATH_CHECK( inputDecisions.isValid() );
+    ATH_MSG_DEBUG( "Checking inputHandle " << inputDecisions.key() << " with size: " << inputDecisions->size() );
+    for (const TrigCompositeUtils::Decision* dec : *inputDecisions) {
+      TrigCompositeUtils::DecisionIDContainer decIDs;
+      TrigCompositeUtils::decisionIDs(dec, decIDs);
+      for (const auto& legID : decIDs) {
+        // in case of asymmetric trigger we should use HLT identifier which corresponds to a whole chain,
+        // i.e. use HLT_mu6_mu4_bJpsimumu_L1MU6_2MU4 instead of leg001_HLT_mu6_mu4_bJpsimumu_L1MU6_2MU4;
+        // TrigCompositeUtils::getIDFromLeg() will return unchanged id for the symmetric trigger
+        HLT::Identifier id = TrigCompositeUtils::getIDFromLeg(HLT::Identifier(legID));
+        std::string chainName = HLT::Identifier(id).name();
+        const auto itr = m_filterChainIDs.find(id.numeric());
+        if (!m_notGate) {  // pass if id does NOT match to any trigger from the filter list
+          if (itr != m_filterChainIDs.end()) {
+            ATH_MSG_DEBUG( "chain " << chainName << " is on the filter list, keep looking" );
+          }
+          else {
+            ATH_MSG_DEBUG( "chain " << chainName << " is not on the filter list, passing" );
+            setFilterPassed(true);
+            return StatusCode::SUCCESS;
+          }
+        }
+        else {  // pass if id is found in the filter list
+          if (itr != m_filterChainIDs.end()) {
+            ATH_MSG_DEBUG( "chain " << chainName << " is on the not-filter list, passing" );
+            setFilterPassed(true);
+            return StatusCode::SUCCESS;
+          }
+          else {
+            ATH_MSG_DEBUG( "chain " << chainName << " is not on the not-filter list, keep looking" );
+          }
+        }
       }
     }
-    else ATH_MSG_DEBUG("No valid inputs found");
   }
 
-  //If we've reached this point, the only active chains were on the 
-  //filter list, so the filter will fail
-  ATH_MSG_DEBUG("No chains found, pass = "<<pass);
-  //write out empty muComb container since edm creator expects the container to always be present in the view
-  if(!pass && m_writeL2muComb){
-    SG::WriteHandle wh_muons(m_muCombKey);
-    ATH_CHECK( wh_muons.record (std::make_unique<xAOD::L2CombinedMuonContainer>(), std::make_unique<xAOD::L2CombinedMuonAuxContainer>()) );
+  // if we've reached this point, the only active chains were on the filter list, so the filter will fail
+  ATH_MSG_DEBUG( "No trigger chains found, pass = false" );
+  ATH_CHECK( createDummyMuonContainers() );
+  setFilterPassed(false);
+
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode MuonChainFilterAlg::createDummyMuonContainers() {
+
+  // write out empty muComb/muFast container since EDM creator expects the container to always be present in the view
+  if (m_writeL2muComb) {
+    SG::WriteHandle handle(m_muCombKey);
+    ATH_CHECK( handle.record(std::make_unique<xAOD::L2CombinedMuonContainer>(), std::make_unique<xAOD::L2CombinedMuonAuxContainer>()) );
   }
-  //write out empty muFast container since edm creator expects the container to always be present in the view
-  if(!pass && m_writeL2muFast){
-    SG::WriteHandle wh_muons(m_muFastKey);
-    ATH_CHECK( wh_muons.record (std::make_unique<xAOD::L2StandAloneMuonContainer>(), std::make_unique<xAOD::L2StandAloneMuonAuxContainer>()) );
+  if (m_writeL2muFast) {
+    SG::WriteHandle handle(m_muFastKey);
+    ATH_CHECK( handle.record(std::make_unique<xAOD::L2StandAloneMuonContainer>(), std::make_unique<xAOD::L2StandAloneMuonAuxContainer>()) );
   }
-  setFilterPassed(pass);
-
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.h b/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.h
index f06ac03644a0..e5f187279006 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.h
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/src/MuonChainFilterAlg.h
@@ -1,7 +1,5 @@
 /*
-  Filter to deselect chains for muon trigger algorithms
-  
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIGMUONEF_MUONCHAINFILTERALG_H
@@ -9,40 +7,38 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "StoreGate/ReadHandleKeyArray.h"
-#include "TrigCompositeUtils/TrigCompositeUtils.h"
+#include "xAODTrigger/TrigComposite.h"
+#include "xAODTrigger/TrigCompositeContainer.h"
 #include "xAODTrigMuon/L2CombinedMuonContainer.h"
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h"
 
-class MuonChainFilterAlg : public AthAlgorithm
-{
-  public :
-
-    /** Constructor **/
-    MuonChainFilterAlg( const std::string& name, ISvcLocator* pSvcLocator );
-  
-    /** initialize */
-    StatusCode initialize();
-  
-    /** finalize */
-    StatusCode finalize();
-  
-    /** execute the filter alg */
-    StatusCode execute();
-
-
-  private :
-
-    Gaudi::Property< std::vector<std::string> > m_filterChains {this, "ChainsToFilter", { }, "Vector of chains to filter out" };
-    Gaudi::Property< bool > m_writeL2muComb {this, "WriteMuComb", false, "Flag to record muComb muons" };
-
-    SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer>  m_inputDecisionKeys{ this, "InputDecisions", {}, "Inputs to the filter" };
+/**
+ * @class MuonChainFilterAlg filter to (de)select chains for muon trigger algorithms
+ * initially designed to pass if at least one active chain is NOT in the list to be filtered (NotGate = false)
+ * the filter will also pass if NotGate = true and at least one active chain is FOUND in the list
+ **/
+class MuonChainFilterAlg : public ::AthAlgorithm {
+ public:
+  MuonChainFilterAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  StatusCode initialize();
+  StatusCode finalize() { return StatusCode::SUCCESS; }
+  StatusCode execute();
+
+ private:
+    StatusCode createDummyMuonContainers();
+
+    Gaudi::Property<std::vector<std::string>> m_filterChains {this, "ChainsToFilter", {}, "Vector of chains to filter out"};
+    SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> m_inputDecisionKeys{this, "InputDecisions", {}, "Inputs to the filter"};
+
+    Gaudi::Property<bool> m_writeL2muComb {this, "WriteMuComb", false, "Flag to record muComb muons"};
     SG::WriteHandleKey<xAOD::L2CombinedMuonContainer> m_muCombKey {this, "L2MuCombContainer", "MuonL2CBInfo", "Output container for muComb"};
 
-    Gaudi::Property< bool > m_writeL2muFast {this, "WriteMuFast", false, "Flag to record muFast muons" };
+    Gaudi::Property<bool> m_writeL2muFast {this, "WriteMuFast", false, "Flag to record muFast muons"};
     SG::WriteHandleKey<xAOD::L2StandAloneMuonContainer> m_muFastKey {this, "L2MuFastContainer", "MuonL2SAInfo", "Output container for muFast"};
 
-    Gaudi::Property< bool > m_notGate {this, "NotGate", false, "filtering if not contained in ChainsToFilter" };
+    Gaudi::Property<bool> m_notGate {this, "NotGate", false, "filtering if not contained in ChainsToFilter"};
 
+    TrigCompositeUtils::DecisionIDContainer m_filterChainIDs;
 };
 
 #endif
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py
index a63267ae0539..923d1ba4cf28 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py
@@ -127,7 +127,7 @@ class MuonChainConfiguration(ChainConfigurationBase):
     # --------------------
     def getmuFast(self):
         doOvlpRm = False
-        if "bTau" in self.chainName or "bJpsi" in self.chainName or "bUpsi" in self.chainName or "bDimu" in self.chainName or "bBmu" in self.chainName or "l2io" in self.chainName:
+        if any(x in self.chainName for x in ['bJpsi', 'bUpsi', 'bDimu', 'bBmu', 'bPhi', 'bTau', 'l2io']):
            doOvlpRm = False
         elif self.mult>1:
            doOvlpRm = True
@@ -145,7 +145,7 @@ class MuonChainConfiguration(ChainConfigurationBase):
     def getmuComb(self):
 
         doOvlpRm = False
-        if "bTau" in self.chainName or "bJpsi" in self.chainName or "bUpsi" in self.chainName or "bDimu" in self.chainName or "bBmu" in self.chainName:
+        if any(x in self.chainName for x in ['bJpsi', 'bUpsi', 'bDimu', 'bBmu', 'bPhi', 'bTau']):
            doOvlpRm = False
         elif self.mult>1:
            doOvlpRm = True
-- 
GitLab


From 206bc0a27a886341ecc0ea813e541614b8ccf93a Mon Sep 17 00:00:00 2001
From: Vladimir Lyubushkin <Vladimir.Lyubushkin@cern.ch>
Date: Sun, 14 Feb 2021 17:15:33 +0100
Subject: [PATCH 2/5] add dimuL2Sequence

---
 .../python/TrigBmumuxComboHypoConfig.py       | 13 +++++-----
 .../python/TrigBphysStreamerHypoConfig.py     |  5 ++--
 .../python/TrigMultiTrkComboHypoConfig.py     |  9 +++----
 .../src/TrigBphysStreamerHypo.cxx             |  4 +++-
 .../TrigBphysHypo/src/TrigBphysStreamerHypo.h |  1 +
 .../HLTMenuConfig/Bphysics/BphysicsDef.py     | 24 ++++++++++---------
 .../Bphysics/BphysicsSequenceSetup.py         | 24 +++++++++++++++----
 7 files changed, 52 insertions(+), 28 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBmumuxComboHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBmumuxComboHypoConfig.py
index 80f62a8821b1..688b982a38a5 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBmumuxComboHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBmumuxComboHypoConfig.py
@@ -1,5 +1,6 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
+from AthenaConfiguration.ComponentFactory import CompFactory
 from TrigBphysHypo.TrigBphysHypoConf import TrigBmumuxComboHypo, TrigBmumuxComboHypoTool
 from TrigBphysHypo.TrigBmumuxComboHypoMonitoringConfig import TrigBmumuxComboHypoMonitoring, TrigBmumuxComboHypoToolMonitoring
 
@@ -13,14 +14,14 @@ def BmumuxComboHypoCfg(name):
 
     from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
     from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
-    vertexFitter = Trk__TrkVKalVrtFitter(
+    vertexFitter = CompFactory.Trk__TrkVKalVrtFitter(
         name = 'TrigBphysFitter_'+suffix,
         FirstMeasuredPoint = False,
         MakeExtendedVertex = False,
         Extrapolator = AtlasExtrapolator())
 
     from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
-    vertexPointEstimator = InDet__VertexPointEstimator(
+    vertexPointEstimator = CompFactory.InDet__VertexPointEstimator(
         name = 'VertexPointEstimator_'+suffix,
         MinDeltaR = [-10000., -10000., -10000.],
         MaxDeltaR = [ 10000.,  10000.,  10000.],
@@ -28,11 +29,11 @@ def BmumuxComboHypoCfg(name):
         MaxChi2OfVtxEstimation = 2000.)
 
     from TrackToVertex.TrackToVertexConf import Reco__TrackToVertex
-    trackToVertexTool = Reco__TrackToVertex(
+    trackToVertexTool = CompFactory.Reco__TrackToVertex(
         name = 'TrackToVertexTool_'+suffix,
         Extrapolator = AtlasExtrapolator())
 
-    hypo = TrigBmumuxComboHypo(
+    hypo = CompFactory.TrigBmumuxComboHypo(
         name = 'BmumuxComboHypo',
         VertexFitter = vertexFitter,
         VertexPointEstimator = vertexPointEstimator,
@@ -101,7 +102,7 @@ class TrigBmumuxComboHypoConfig(object):
         topoAlgs = chainDict['chainName']
         log.debug("Set for algorithm %s", topoAlgs)
 
-        tool = TrigBmumuxComboHypoTool(topoAlgs)
+        tool = CompFactory.TrigBmumuxComboHypoTool(topoAlgs)
         decay = chainDict['topo'][-1]
         trigDecayDict = {     # xAOD::TrigBphys::pType
             'BpmumuKp':   7,  # BKMUMU
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysStreamerHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysStreamerHypoConfig.py
index fe26b09e085b..f5551d96e78e 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysStreamerHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigBphysStreamerHypoConfig.py
@@ -1,7 +1,8 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
+from AthenaConfiguration.ComponentFactory import CompFactory
 from TrigBphysHypo.TrigBphysHypoConf import TrigBphysStreamerHypoTool
 
 def TrigBphysStreamerHypoToolFromDict(chainDict):
-    tool = TrigBphysStreamerHypoTool(chainDict['chainName'])
+    tool = CompFactory.TrigBphysStreamerHypoTool(chainDict['chainName'])
     return tool
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoConfig.py b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoConfig.py
index 5f71217e171d..504322776cee 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoConfig.py
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/python/TrigMultiTrkComboHypoConfig.py
@@ -1,5 +1,6 @@
 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 
+from AthenaConfiguration.ComponentFactory import CompFactory
 from TrigBphysHypo.TrigBphysHypoConf import TrigMultiTrkComboHypo, TrigMultiTrkComboHypoTool
 from TrigBphysHypo.TrigMultiTrkComboHypoMonitoringConfig import TrigMultiTrkComboHypoMonitoring, TrigMultiTrkComboHypoToolMonitoring
 
@@ -61,21 +62,21 @@ class TrigMultiTrkComboHypoConfig(object):
 
         from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
         from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
-        VertexFitter = Trk__TrkVKalVrtFitter(
+        VertexFitter = CompFactory.Trk__TrkVKalVrtFitter(
             name = 'TrigBphysFitter_'+trigSequenceName+trigLevel,
             FirstMeasuredPoint = False,
             MakeExtendedVertex = False,
             Extrapolator = AtlasExtrapolator())
 
         from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
-        VertexPointEstimator = InDet__VertexPointEstimator(
+        VertexPointEstimator = CompFactory.InDet__VertexPointEstimator(
             name = 'VertexPointEstimator_'+trigSequenceName+trigLevel,
             MinDeltaR = [-10000., -10000., -10000.],
             MaxDeltaR = [ 10000.,  10000.,  10000.],
             MaxPhi    = [ 10000.,  10000.,  10000.],
             MaxChi2OfVtxEstimation = 2000.)
 
-        tool = TrigMultiTrkComboHypo(
+        tool = CompFactory.TrigMultiTrkComboHypo(
             name = trigSequenceName+trigLevel+'ComboHypo',
             trigLevel = trigLevel,
             nTracks = 2,
@@ -94,7 +95,7 @@ class TrigMultiTrkComboHypoConfig(object):
 
     def ConfigurationComboHypoTool(self, chainDict):
 
-        tool = TrigMultiTrkComboHypoTool(chainDict['chainName'])
+        tool = CompFactory.TrigMultiTrkComboHypoTool(chainDict['chainName'])
 
         try:
             topo = chainDict['topo'][0]
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
index 542e7b831493..406fecab767e 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
@@ -42,11 +42,13 @@ StatusCode TrigBphysStreamerHypo::execute( const EventContext& context ) const {
 
   for (const Decision* previousDecision : *previousDecisionsHandle) {
     Decision* decision = TrigCompositeUtils::newDecisionIn(decisions, previousDecision, TrigCompositeUtils::hypoAlgNodeName(), context);
+    TrigCompositeUtils::insertDecisionIDs(previousDecision, decision);
+
+    if (!m_requireParentMuon) continue;
 
     auto muonLinkInfo = TrigCompositeUtils::findLink<xAOD::MuonContainer>(previousDecision, TrigCompositeUtils::featureString(), true);
     ATH_CHECK( muonLinkInfo.isValid() );
     decision->setObjectLink<xAOD::MuonContainer>(TrigCompositeUtils::featureString(), muonLinkInfo.link);
-    TrigCompositeUtils::insertDecisionIDs(previousDecision, decision);
 
     if (msgLvl(MSG::DEBUG)) {
       const xAOD::Muon* muon = *(muonLinkInfo.link);
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
index 581708c471d9..3a05e3f653c7 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
@@ -25,6 +25,7 @@ class TrigBphysStreamerHypo : public ::HypoBase {
 
  private:
   ToolHandleArray<TrigBphysStreamerHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"};
+  Gaudi::Property<bool> m_requireParentMuon {this, "requireParentMuon", true, "if true, the copied decision will be augmented with link to xAOD::Muon object from TrigCompositeUtils::findLink"};
 
 };
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsDef.py
index 323bb3164bd8..dc37a879591a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsDef.py
@@ -12,8 +12,7 @@ log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Bphysics.BphysicsDef")
 from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
 from TriggerMenuMT.HLTMenuConfig.Muon.MuonDef import MuonChainConfiguration as MuonChainConfiguration
 
-from TriggerMenuMT.HLTMenuConfig.Muon.MuonDef import muCombSequenceCfg
-from TriggerMenuMT.HLTMenuConfig.Bphysics.BphysicsSequenceSetup import bmumuxSequence, dimuSequence
+from TriggerMenuMT.HLTMenuConfig.Bphysics.BphysicsSequenceSetup import dimuL2Sequence, dimuEFSequence, bmumuxSequence
 
 from TrigBphysHypo.TrigMultiTrkComboHypoConfig import DimuL2ComboHypoCfg, DimuEFComboHypoCfg, TrigMultiTrkComboHypoToolFromDict
 from TrigBphysHypo.TrigBmumuxComboHypoConfig import BmumuxComboHypoCfg, TrigBmumuxComboHypoToolFromDict
@@ -23,8 +22,11 @@ from TrigBphysHypo.TrigBmumuxComboHypoConfig import BmumuxComboHypoCfg, TrigBmum
 # I have no idea what the above sentence means - copy/paste from muons...
 #--------------------------------------------------------
 
-def dimuSequenceCfg(flags):
-    return dimuSequence()
+def dimuL2SequenceCfg(flags):
+    return dimuL2Sequence()
+
+def dimuEFSequenceCfg(flags):
+    return dimuEFSequence()
 
 def bmumuxSequenceCfg(flags):
     return bmumuxSequence()
@@ -61,9 +63,9 @@ class BphysicsChainConfiguration(MuonChainConfiguration):
     def getBphysStepDictionary(self):
 
         stepDictionary = {
-            'dimu'   : [['getmuFast', 'getDimuComb'], ['getmuEFSA', 'getmuEFCB', 'getDimu']],
-            'bl2io'  : [['getmuFast', 'getmuCombIO'], ['getmuEFSA', 'getmuEFCB', 'getDimu']],
-            'bmumux' : [['getmuFast', 'getDimuComb'], ['getmuEFSA', 'getmuEFCB', 'getBmumux']],
+            'dimu'   : [['getmuFast', 'getDimuL2'], ['getmuEFSA', 'getmuEFCB', 'getDimuEF']],
+            'bl2io'  : [['getmuFast', 'getmuCombIO'], ['getmuEFSA', 'getmuEFCB', 'getDimuEF']],
+            'bmumux' : [['getmuFast', 'getDimuL2'], ['getmuEFSA', 'getmuEFCB', 'getBmumux']],
         }
         return stepDictionary
 
@@ -88,11 +90,11 @@ class BphysicsChainConfiguration(MuonChainConfiguration):
 
         return topo_dict[the_topo]
 
-    def getDimuComb(self):
-        return self.getStep(2, 'dimuComb', [muCombSequenceCfg], comboHypoCfg=DimuL2ComboHypoCfg)
+    def getDimuL2(self):
+        return self.getStep(2, 'dimuL2', [dimuL2SequenceCfg], comboHypoCfg=DimuL2ComboHypoCfg)
 
-    def getDimu(self):
-        return self.getStep(5, 'dimu', [dimuSequenceCfg], comboHypoCfg=DimuEFComboHypoCfg, comboTools=[TrigMultiTrkComboHypoToolFromDict])
+    def getDimuEF(self):
+        return self.getStep(5, 'dimuEF', [dimuEFSequenceCfg], comboHypoCfg=DimuEFComboHypoCfg, comboTools=[TrigMultiTrkComboHypoToolFromDict])
 
     def getBmumux(self):
         return self.getStep(5, 'bmumux', [bmumuxSequenceCfg], comboHypoCfg=BmumuxComboHypoCfg, comboTools=[TrigBmumuxComboHypoToolFromDict])
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
index 8baddfc29168..05842b9974c1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
@@ -52,23 +52,39 @@ def bmumuxSequence():
         HypoToolGen = TrigBphysStreamerHypoToolFromDict)
 
 
-def dimuSequence():
+def dimuL2Sequence():
+    from TriggerMenuMT.HLTMenuConfig.Muon.MuonSequenceSetup import muCombAlgSequence
+    from TrigBphysHypo.TrigBphysHypoConf import TrigBphysStreamerHypo
+    from TrigBphysHypo.TrigBphysStreamerHypoConfig import TrigBphysStreamerHypoToolFromDict
+
+    sequence, viewMaker, combinedMuonContainerName = RecoFragmentsPool.retrieve(muCombAlgSequence, ConfigFlags)
+
+    hypo = TrigBphysStreamerHypo('DimuL2StreamerHypoAlg', requireParentMuon = False)
+
+    return MenuSequence(
+        Sequence = sequence,
+        Maker = viewMaker,
+        Hypo = hypo,
+        HypoToolGen = TrigBphysStreamerHypoToolFromDict)
+
+
+def dimuEFSequence():
     from DecisionHandling.DecisionHandlingConf import InputMakerForRoI, ViewCreatorPreviousROITool
     from TrigBphysHypo.TrigBphysHypoConf import TrigBphysStreamerHypo
     from TrigBphysHypo.TrigBphysStreamerHypoConfig import TrigBphysStreamerHypoToolFromDict
 
-    inputMakerAlg = InputMakerForRoI(
+    viewMaker = InputMakerForRoI(
         name = 'IM_bphysStreamerDimu',
         mergeUsingFeature = True,
         RoITool = ViewCreatorPreviousROITool(),
         RoIs = 'DimuRoIs')
 
-    sequence = seqAND('dimuSequence', [inputMakerAlg])
+    sequence = seqAND('dimuSequence', [viewMaker])
 
     hypo = TrigBphysStreamerHypo('DimuStreamerHypoAlg')
 
     return MenuSequence(
         Sequence = sequence,
-        Maker = inputMakerAlg,
+        Maker = viewMaker,
         Hypo = hypo,
         HypoToolGen = TrigBphysStreamerHypoToolFromDict)
-- 
GitLab


From 0ee755e67036d40fc832905c3d153e5a0539e3b4 Mon Sep 17 00:00:00 2001
From: Vladimir Lyubushkin <Vladimir.Lyubushkin@cern.ch>
Date: Mon, 15 Feb 2021 13:09:12 +0100
Subject: [PATCH 3/5] update reference files

---
 .../src/TrigBphysStreamerHypo.cxx             | 50 ++++++-----
 .../TrigBphysHypo/src/TrigBphysStreamerHypo.h |  4 +-
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 84 +++++++++----------
 .../share/ref_data_v1Dev_build.ref            | 58 +++++++------
 .../Bphysics/BphysicsSequenceSetup.py         |  6 +-
 5 files changed, 109 insertions(+), 93 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
index 406fecab767e..a15523c9d736 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
@@ -1,11 +1,12 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigBphysStreamerHypo.h"
 
 #include "xAODMuon/Muon.h"
 #include "xAODMuon/MuonContainer.h"
+#include "xAODTrigMuon/L2StandAloneMuonContainer.h"
 
 #include "TrigCompositeUtils/HLTIdentifier.h"
 #include "TrigCompositeUtils/TrigCompositeUtils.h"
@@ -22,6 +23,11 @@ TrigBphysStreamerHypo::TrigBphysStreamerHypo(const std::string& name, ISvcLocato
 StatusCode TrigBphysStreamerHypo::initialize() {
   ATH_MSG_DEBUG( "TrigBphysStreamerHypo::initialize()" );
 
+  if (m_triggerLevel != "L2" && m_triggerLevel != "EF") {
+    ATH_MSG_ERROR( "triggerLevel should be L2 or EF, but " << m_triggerLevel << " provided" );
+    return StatusCode::FAILURE;
+  }
+
   ATH_CHECK( m_hypoTools.retrieve() );
   return StatusCode::SUCCESS;
 }
@@ -44,27 +50,33 @@ StatusCode TrigBphysStreamerHypo::execute( const EventContext& context ) const {
     Decision* decision = TrigCompositeUtils::newDecisionIn(decisions, previousDecision, TrigCompositeUtils::hypoAlgNodeName(), context);
     TrigCompositeUtils::insertDecisionIDs(previousDecision, decision);
 
-    if (!m_requireParentMuon) continue;
-
-    auto muonLinkInfo = TrigCompositeUtils::findLink<xAOD::MuonContainer>(previousDecision, TrigCompositeUtils::featureString(), true);
-    ATH_CHECK( muonLinkInfo.isValid() );
-    decision->setObjectLink<xAOD::MuonContainer>(TrigCompositeUtils::featureString(), muonLinkInfo.link);
-
-    if (msgLvl(MSG::DEBUG)) {
-      const xAOD::Muon* muon = *(muonLinkInfo.link);
-      if (muon->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle)) {
-        const ElementLink<xAOD::TrackParticleContainer> trackEL = muon->inDetTrackParticleLink();
-        ATH_CHECK( trackEL.isValid() );
-        const xAOD::TrackParticle* track = *trackEL;
-        ATH_MSG_DEBUG( " -- muon pt/eta/phi/q: " << track->pt() << " / " << track->eta() << " / " << track->phi() << " / " << track->charge() );
-        ATH_MSG_DEBUG( " Allowed decisions:" );
-        DecisionIDContainer IDs;
-        TrigCompositeUtils::decisionIDs(decision, IDs);
-        for (const TrigCompositeUtils::DecisionID& id : IDs) {
-          ATH_MSG_DEBUG( " +++ " << HLT::Identifier(id) );
+    if (m_triggerLevel == "L2") {
+      auto muonLinkInfo = TrigCompositeUtils::findLink<xAOD::L2StandAloneMuonContainer>(previousDecision, TrigCompositeUtils::featureString(), true);
+      ATH_CHECK( muonLinkInfo.isValid() );
+      decision->setObjectLink<xAOD::L2StandAloneMuonContainer>(TrigCompositeUtils::featureString(), muonLinkInfo.link);
+    }
+    else if (m_triggerLevel == "EF") {
+      auto muonLinkInfo = TrigCompositeUtils::findLink<xAOD::MuonContainer>(previousDecision, TrigCompositeUtils::featureString(), true);
+      ATH_CHECK( muonLinkInfo.isValid() );
+      decision->setObjectLink<xAOD::MuonContainer>(TrigCompositeUtils::featureString(), muonLinkInfo.link);
+
+      if (msgLvl(MSG::DEBUG)) {
+        const xAOD::Muon* muon = *(muonLinkInfo.link);
+        if (muon->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle)) {
+          const ElementLink<xAOD::TrackParticleContainer> trackEL = muon->inDetTrackParticleLink();
+          ATH_CHECK( trackEL.isValid() );
+          const xAOD::TrackParticle* track = *trackEL;
+          ATH_MSG_DEBUG( " -- muon pt/eta/phi/q: " << track->pt() << " / " << track->eta() << " / " << track->phi() << " / " << track->charge() );
+          ATH_MSG_DEBUG( " Allowed decisions:" );
+          DecisionIDContainer IDs;
+          TrigCompositeUtils::decisionIDs(decision, IDs);
+          for (const TrigCompositeUtils::DecisionID& id : IDs) {
+            ATH_MSG_DEBUG( " +++ " << HLT::Identifier(id) );
+          }
         }
       }
     }
+
   }
 
   ATH_CHECK( hypoBaseOutputProcessing(outputHandle) );
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
index 3a05e3f653c7..59884ee227bb 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRIG_TrigBphysStreamerHypo_H
@@ -25,7 +25,7 @@ class TrigBphysStreamerHypo : public ::HypoBase {
 
  private:
   ToolHandleArray<TrigBphysStreamerHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"};
-  Gaudi::Property<bool> m_requireParentMuon {this, "requireParentMuon", true, "if true, the copied decision will be augmented with link to xAOD::Muon object from TrigCompositeUtils::findLink"};
+  Gaudi::Property<std::string> m_triggerLevel {this, "triggerLevel", "EF", "use xAOD::L2StandAloneMuon at L2 level and xAOD::Muon at EF level as a trigger feature object"};
 
 };
 
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 45b6218fdbad..48ecce11d044 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -165,7 +165,7 @@ HLT_2mu14_L12MU10:
     3: 1
   stepFeatures:
     0: 4
-    1: 2
+    1: 6
     2: 2
     3: 2
 HLT_2mu14_l2io_L12MU10:
@@ -177,7 +177,7 @@ HLT_2mu14_l2io_L12MU10:
     3: 1
   stepFeatures:
     0: 4
-    1: 5
+    1: 9
     2: 2
     3: 2
 HLT_2mu15_L12MU10:
@@ -189,7 +189,7 @@ HLT_2mu15_L12MU10:
     3: 1
   stepFeatures:
     0: 4
-    1: 2
+    1: 6
     2: 2
     3: 2
 HLT_2mu4_L12MU4:
@@ -201,7 +201,7 @@ HLT_2mu4_L12MU4:
     3: 2
   stepFeatures:
     0: 6
-    1: 6
+    1: 12
     2: 4
     3: 4
 HLT_2mu4_bBmumux_BcmumuPi_L12MU4:
@@ -317,7 +317,7 @@ HLT_2mu4_muonqual_L12MU4:
     3: 2
   stepFeatures:
     0: 6
-    1: 6
+    1: 12
     2: 4
     3: 4
 HLT_2mu6_10invm70_L1MU6:
@@ -329,7 +329,7 @@ HLT_2mu6_10invm70_L1MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 4
+    1: 10
     2: 4
     3: 4
 HLT_2mu6_Dr_L12MU4:
@@ -339,7 +339,7 @@ HLT_2mu6_Dr_L12MU4:
     1: 2
   stepFeatures:
     0: 6
-    1: 4
+    1: 10
 HLT_2mu6_L12MU6:
   eventCount: 2
   stepCounts:
@@ -349,7 +349,7 @@ HLT_2mu6_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 4
+    1: 10
     2: 4
     3: 4
 HLT_2mu6_bJpsimumu_L12MU6:
@@ -374,7 +374,7 @@ HLT_2mu6_bJpsimumul2io_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 7
+    1: 13
     2: 4
     3: 4
     4: 4
@@ -387,7 +387,7 @@ HLT_2mu6_l2io_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 7
+    1: 13
     2: 4
     3: 4
 HLT_2mu6_muonqual_L12MU6:
@@ -399,7 +399,7 @@ HLT_2mu6_muonqual_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 4
+    1: 10
     2: 4
     3: 4
 HLT_3j200_L1J100:
@@ -2551,7 +2551,7 @@ HLT_mu10_L1MU10:
     3: 9
   stepFeatures:
     0: 12
-    1: 12
+    1: 17
     2: 13
     3: 11
 HLT_mu10_ivarmedium_mu10_10invm70_L12MU10:
@@ -2564,7 +2564,7 @@ HLT_mu10_ivarmedium_mu10_10invm70_L12MU10:
     4: 2
   stepFeatures:
     0: 10
-    1: 8
+    1: 16
     2: 8
     3: 8
     4: 2
@@ -2663,7 +2663,7 @@ HLT_mu14_L1MU10:
     3: 7
   stepFeatures:
     0: 12
-    1: 8
+    1: 13
     2: 8
     3: 8
 HLT_mu14_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1MU10_TAU12IM_XE35:
@@ -2680,7 +2680,7 @@ HLT_mu14_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1MU10_TAU12IM_XE35:
     8: 1
   stepFeatures:
     0: 4
-    1: 3
+    1: 4
     2: 3
     3: 3
     4: 6
@@ -2699,7 +2699,7 @@ HLT_mu20_2mu4noL1_L1MU20:
     5: 1
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 7
     3: 7
     4: 2
@@ -2716,7 +2716,7 @@ HLT_mu20_ivarmedium_mu4noL1_10invm70_L1MU20:
     6: 2
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 7
     3: 7
     4: 4
@@ -2734,7 +2734,7 @@ HLT_mu20_ivarmedium_mu8noL1_L1MU20:
     6: 1
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 7
     3: 7
     4: 4
@@ -2751,7 +2751,7 @@ HLT_mu22_2mu4noL1_L1MU20:
     5: 1
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
     4: 2
@@ -2767,7 +2767,7 @@ HLT_mu22_mu10noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
     4: 4
@@ -2783,7 +2783,7 @@ HLT_mu22_mu8noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
     4: 4
@@ -2797,7 +2797,7 @@ HLT_mu24_L1MU20:
     3: 5
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
 HLT_mu24_idperf_L1MU20:
@@ -2809,7 +2809,7 @@ HLT_mu24_idperf_L1MU20:
     3: 5
   stepFeatures:
     0: 7
-    1: 7
+    1: 11
     2: 6
     3: 6
 HLT_mu24_ivarmedium_L1MU20:
@@ -2822,7 +2822,7 @@ HLT_mu24_ivarmedium_L1MU20:
     4: 3
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
     4: 3
@@ -2837,7 +2837,7 @@ HLT_mu24_mu10noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
     4: 4
@@ -2853,7 +2853,7 @@ HLT_mu24_mu8noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 6
     4: 4
@@ -2867,7 +2867,7 @@ HLT_mu26_L1MU20:
     3: 4
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 5
 HLT_mu26_ivarmedium_L1MU20:
@@ -2880,7 +2880,7 @@ HLT_mu26_ivarmedium_L1MU20:
     4: 3
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 5
     4: 3
@@ -2894,7 +2894,7 @@ HLT_mu26_ivarperf_L1MU20:
     4: 4
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 5
     4: 5
@@ -2908,7 +2908,7 @@ HLT_mu28_ivarmedium_L1MU20:
     4: 3
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 6
     3: 4
     4: 3
@@ -2921,7 +2921,7 @@ HLT_mu4_l2io_L1MU4:
     3: 11
   stepFeatures:
     0: 14
-    1: 30
+    1: 36
     2: 15
     3: 15
 HLT_mu50_L1MU20:
@@ -2933,7 +2933,7 @@ HLT_mu50_L1MU20:
     3: 1
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 1
     3: 1
 HLT_mu50_RPCPEBSecondaryReadout_L1MU20:
@@ -2946,7 +2946,7 @@ HLT_mu50_RPCPEBSecondaryReadout_L1MU20:
     4: 1
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 1
     3: 1
     4: 1
@@ -2965,7 +2965,7 @@ HLT_mu60_L1MU20:
     3: 1
   stepFeatures:
     0: 10
-    1: 7
+    1: 12
     2: 1
     3: 1
 HLT_mu6_2mu4_bDimu2700_L1MU6_3MU4:
@@ -2981,7 +2981,7 @@ HLT_mu6_L1MU6:
     3: 10
   stepFeatures:
     0: 13
-    1: 12
+    1: 18
     2: 13
     3: 13
 HLT_mu6_LRT_idperf_l2lrt_L1MU6:
@@ -3001,7 +3001,7 @@ HLT_mu6_idperf_L1MU6:
     3: 10
   stepFeatures:
     0: 13
-    1: 13
+    1: 19
     2: 13
     3: 13
 HLT_mu6_ivarmedium_L1MU6:
@@ -3014,7 +3014,7 @@ HLT_mu6_ivarmedium_L1MU6:
     4: 6
   stepFeatures:
     0: 13
-    1: 12
+    1: 18
     2: 13
     3: 13
     4: 6
@@ -3027,7 +3027,7 @@ HLT_mu6_j45_nojcalib_L1J20:
     3: 9
   stepFeatures:
     0: 11
-    1: 10
+    1: 14
     2: 11
     3: 11
 HLT_mu6_msonly_L1MU6:
@@ -3047,7 +3047,7 @@ HLT_mu6_mu4_L12MU4:
     3: 2
   stepFeatures:
     0: 14
-    1: 11
+    1: 23
     2: 10
     3: 8
 HLT_mu6_mu6noL1_L1MU6:
@@ -3061,7 +3061,7 @@ HLT_mu6_mu6noL1_L1MU6:
     5: 3
   stepFeatures:
     0: 13
-    1: 12
+    1: 18
     2: 13
     3: 13
     4: 11
@@ -3076,7 +3076,7 @@ HLT_mu6_xe30_mht_L1XE10:
     4: 9
   stepFeatures:
     0: 12
-    1: 11
+    1: 17
     2: 12
     3: 12
     4: 9
@@ -3097,7 +3097,7 @@ HLT_mu8_L1MU6:
     3: 10
   stepFeatures:
     0: 13
-    1: 12
+    1: 18
     2: 13
     3: 13
 HLT_noalg_L1All:
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 23f369aec5ed..69b52317dfec 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -96,6 +96,7 @@ HLT_2mu4_L12MU4:
     0: 1
   stepFeatures:
     0: 2
+    1: 2
 HLT_2mu4_bBmumux_BcmumuPi_L12MU4:
   eventCount: 0
   stepCounts:
@@ -158,6 +159,7 @@ HLT_2mu4_muonqual_L12MU4:
     0: 1
   stepFeatures:
     0: 2
+    1: 2
 HLT_2mu6_10invm70_L1MU6:
   eventCount: 0
 HLT_2mu6_Dr_L12MU4:
@@ -166,6 +168,7 @@ HLT_2mu6_Dr_L12MU4:
     0: 1
   stepFeatures:
     0: 2
+    1: 2
 HLT_2mu6_L12MU6:
   eventCount: 0
 HLT_2mu6_bJpsimumu_L12MU6:
@@ -1515,7 +1518,7 @@ HLT_mu10_L1MU10:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu10_ivarmedium_mu10_10invm70_L12MU10:
   eventCount: 0
   stepFeatures:
@@ -1557,7 +1560,7 @@ HLT_mu14_L1MU10:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu14_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1MU10_TAU12IM_XE35:
   eventCount: 0
   stepFeatures:
@@ -1569,7 +1572,7 @@ HLT_mu20_2mu4noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu20_ivarmedium_mu4noL1_10invm70_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1577,7 +1580,7 @@ HLT_mu20_ivarmedium_mu4noL1_10invm70_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu20_ivarmedium_mu8noL1_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1585,7 +1588,7 @@ HLT_mu20_ivarmedium_mu8noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu22_2mu4noL1_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1593,7 +1596,7 @@ HLT_mu22_2mu4noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu22_mu10noL1_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1601,7 +1604,7 @@ HLT_mu22_mu10noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu22_mu8noL1_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1609,7 +1612,7 @@ HLT_mu22_mu8noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu24_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1617,7 +1620,7 @@ HLT_mu24_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu24_idperf_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1625,7 +1628,7 @@ HLT_mu24_idperf_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu24_ivarmedium_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1633,7 +1636,7 @@ HLT_mu24_ivarmedium_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu24_mu10noL1_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1641,7 +1644,7 @@ HLT_mu24_mu10noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu24_mu8noL1_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1649,7 +1652,7 @@ HLT_mu24_mu8noL1_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu26_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1657,7 +1660,7 @@ HLT_mu26_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu26_ivarmedium_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1665,7 +1668,7 @@ HLT_mu26_ivarmedium_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu26_ivarperf_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1673,7 +1676,7 @@ HLT_mu26_ivarperf_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu28_ivarmedium_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1681,13 +1684,14 @@ HLT_mu28_ivarmedium_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu4_l2io_L1MU4:
   eventCount: 0
   stepCounts:
     0: 2
   stepFeatures:
     0: 3
+    1: 2
 HLT_mu50_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1695,7 +1699,7 @@ HLT_mu50_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu50_RPCPEBSecondaryReadout_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1703,7 +1707,7 @@ HLT_mu50_RPCPEBSecondaryReadout_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu60_0eta105_msonly_L1MU20:
   eventCount: 0
 HLT_mu60_L1MU20:
@@ -1713,7 +1717,7 @@ HLT_mu60_L1MU20:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu6_2mu4_bDimu2700_L1MU6_3MU4:
   eventCount: 0
   stepFeatures:
@@ -1729,7 +1733,7 @@ HLT_mu6_L1MU6:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu6_LRT_idperf_l2lrt_L1MU6:
   eventCount: 1
   stepCounts:
@@ -1745,7 +1749,7 @@ HLT_mu6_idperf_L1MU6:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu6_ivarmedium_L1MU6:
   eventCount: 0
   stepCounts:
@@ -1753,7 +1757,7 @@ HLT_mu6_ivarmedium_L1MU6:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu6_j45_nojcalib_L1J20:
   eventCount: 0
   stepFeatures:
@@ -1770,7 +1774,7 @@ HLT_mu6_mu4_L12MU4:
     0: 1
   stepFeatures:
     0: 6
-    1: 2
+    1: 6
 HLT_mu6_mu6noL1_L1MU6:
   eventCount: 0
   stepCounts:
@@ -1778,7 +1782,7 @@ HLT_mu6_mu6noL1_L1MU6:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu6_xe30_mht_L1XE10:
   eventCount: 0
   stepCounts:
@@ -1786,7 +1790,7 @@ HLT_mu6_xe30_mht_L1XE10:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_mu80_msonly_3layersEC_L1MU20:
   eventCount: 0
   stepCounts:
@@ -1800,7 +1804,7 @@ HLT_mu8_L1MU6:
     1: 1
   stepFeatures:
     0: 1
-    1: 1
+    1: 2
 HLT_noalg_L1All:
   eventCount: 20
 HLT_noalg_L1Calo:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
index 05842b9974c1..baab68dd02a6 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
@@ -59,7 +59,7 @@ def dimuL2Sequence():
 
     sequence, viewMaker, combinedMuonContainerName = RecoFragmentsPool.retrieve(muCombAlgSequence, ConfigFlags)
 
-    hypo = TrigBphysStreamerHypo('DimuL2StreamerHypoAlg', requireParentMuon = False)
+    hypo = TrigBphysStreamerHypo('DimuL2StreamerHypoAlg', triggerLevel = 'L2')
 
     return MenuSequence(
         Sequence = sequence,
@@ -74,14 +74,14 @@ def dimuEFSequence():
     from TrigBphysHypo.TrigBphysStreamerHypoConfig import TrigBphysStreamerHypoToolFromDict
 
     viewMaker = InputMakerForRoI(
-        name = 'IM_bphysStreamerDimu',
+        name = 'IM_bphysStreamerDimuEF',
         mergeUsingFeature = True,
         RoITool = ViewCreatorPreviousROITool(),
         RoIs = 'DimuRoIs')
 
     sequence = seqAND('dimuSequence', [viewMaker])
 
-    hypo = TrigBphysStreamerHypo('DimuStreamerHypoAlg')
+    hypo = TrigBphysStreamerHypo('DimuEFStreamerHypoAlg', triggerLevel = 'EF')
 
     return MenuSequence(
         Sequence = sequence,
-- 
GitLab


From d0ef79347fcd99eb88c2de7867548cee36fd52f2 Mon Sep 17 00:00:00 2001
From: Vladimir Lyubushkin <Vladimir.Lyubushkin@cern.ch>
Date: Tue, 16 Feb 2021 13:13:33 +0100
Subject: [PATCH 4/5] modify TrigBphysStreamerHypo to filter out Muon trigger
 chains at step L2

---
 .../src/TrigBphysStreamerHypo.cxx             | 31 +++++++++++++++++--
 .../TrigBphysHypo/src/TrigBphysStreamerHypo.h |  2 ++
 .../Bphysics/BphysicsSequenceSetup.py         | 16 +++++++++-
 3 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
index a15523c9d736..b46fe7bb2abf 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.cxx
@@ -28,6 +28,19 @@ StatusCode TrigBphysStreamerHypo::initialize() {
     return StatusCode::FAILURE;
   }
 
+  // convert chain names into hashes
+  if (!m_triggerList.empty()) {
+    ATH_MSG_DEBUG( "The ID will be copied from the previous decision if it matches with some trigger from the list below:" );
+    for (size_t i = 0; i < m_triggerList.size(); ++i) {
+      const auto id = HLT::Identifier(m_triggerList[i]);
+      m_triggerIDs.insert(id.numeric());
+      ATH_MSG_DEBUG( i << " " << m_triggerList[i] );
+    }
+  }
+  else {
+    ATH_MSG_DEBUG( "The triggerList is empty, all decision IDs will be copied from the previous decisions" );
+  }
+
   ATH_CHECK( m_hypoTools.retrieve() );
   return StatusCode::SUCCESS;
 }
@@ -40,7 +53,7 @@ StatusCode TrigBphysStreamerHypo::execute( const EventContext& context ) const {
   ATH_MSG_DEBUG( "decision input key: " << decisionInput().key() );
   auto previousDecisionsHandle = SG::makeHandle(decisionInput(), context);
   CHECK( previousDecisionsHandle.isValid() );
-  ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() << " previous decisions" );
+  ATH_MSG_DEBUG( "Running with " << previousDecisionsHandle->size() << " previous decisions" );
 
   // create the mutable output DecisionContainer and register it to StoreGate
   SG::WriteHandle<DecisionContainer> outputHandle = TrigCompositeUtils::createAndStore(decisionOutput(), context);
@@ -48,7 +61,21 @@ StatusCode TrigBphysStreamerHypo::execute( const EventContext& context ) const {
 
   for (const Decision* previousDecision : *previousDecisionsHandle) {
     Decision* decision = TrigCompositeUtils::newDecisionIn(decisions, previousDecision, TrigCompositeUtils::hypoAlgNodeName(), context);
-    TrigCompositeUtils::insertDecisionIDs(previousDecision, decision);
+
+    if (!m_triggerList.empty()) {
+      TrigCompositeUtils::DecisionIDContainer previousDecisionIDs;
+      TrigCompositeUtils::decisionIDs(previousDecision, previousDecisionIDs);
+      for (const auto& previousDecisionID : previousDecisionIDs) {
+        // we should use the HLT identifier which corresponds to a whole chain
+        HLT::Identifier id = TrigCompositeUtils::getIDFromLeg(HLT::Identifier(previousDecisionID));
+        if (m_triggerIDs.find(id.numeric()) != m_triggerIDs.end()) {
+          TrigCompositeUtils::addDecisionID(previousDecisionID, decision);
+        }
+      }
+    }
+    else {
+      TrigCompositeUtils::insertDecisionIDs(previousDecision, decision);
+    }
 
     if (m_triggerLevel == "L2") {
       auto muonLinkInfo = TrigCompositeUtils::findLink<xAOD::L2StandAloneMuonContainer>(previousDecision, TrigCompositeUtils::featureString(), true);
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
index 59884ee227bb..4342df2ce128 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigBphysStreamerHypo.h
@@ -27,6 +27,8 @@ class TrigBphysStreamerHypo : public ::HypoBase {
   ToolHandleArray<TrigBphysStreamerHypoTool> m_hypoTools {this, "HypoTools", {}, "Tools to perform selection"};
   Gaudi::Property<std::string> m_triggerLevel {this, "triggerLevel", "EF", "use xAOD::L2StandAloneMuon at L2 level and xAOD::Muon at EF level as a trigger feature object"};
 
+  Gaudi::Property<std::vector<std::string>> m_triggerList {this, "triggerList", {}, "The streamer will copy ID from the previous Decision if it matches with some trigger from the list; all IDs will be copied if no trigger is specified"};
+  TrigCompositeUtils::DecisionIDContainer m_triggerIDs;
 };
 
 #endif  // TRIG_TrigBphysStreamerHypo_H
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
index baab68dd02a6..8d838f5045c2 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bphysics/BphysicsSequenceSetup.py
@@ -59,7 +59,10 @@ def dimuL2Sequence():
 
     sequence, viewMaker, combinedMuonContainerName = RecoFragmentsPool.retrieve(muCombAlgSequence, ConfigFlags)
 
-    hypo = TrigBphysStreamerHypo('DimuL2StreamerHypoAlg', triggerLevel = 'L2')
+    hypo = TrigBphysStreamerHypo(
+        name = 'DimuL2StreamerHypoAlg',
+        triggerList = getDefaultChainNames(),
+        triggerLevel = 'L2')
 
     return MenuSequence(
         Sequence = sequence,
@@ -88,3 +91,14 @@ def dimuEFSequence():
         Maker = viewMaker,
         Hypo = hypo,
         HypoToolGen = TrigBphysStreamerHypoToolFromDict)
+
+
+def getDefaultChainNames():
+    from TriggerJobOpts.TriggerFlags import TriggerFlags
+    bphysSlice = TriggerFlags.BphysicsSlice.signatures()
+    chains = []
+    if bphysSlice:
+        for chain in bphysSlice:
+            if any(x in chain.name for x in ['bJpsi', 'bUpsi', 'bDimu', 'bBmu', 'bPhi', 'bTau']) and not 'l2io' in chain.name:
+                chains.append(chain.name)
+    return chains
-- 
GitLab


From a53712a4c83f91c70e8bcde00ec20369a23a107b Mon Sep 17 00:00:00 2001
From: Vladimir Lyubushkin <Vladimir.Lyubushkin@cern.ch>
Date: Tue, 16 Feb 2021 13:51:42 +0100
Subject: [PATCH 5/5] update reference files

---
 .../share/ref_RDOtoRDOTrig_v1Dev_build.ref    | 84 +++++++++----------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index a7f75f3124cd..3ab880a897b3 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -165,7 +165,7 @@ HLT_2mu14_L12MU10:
     3: 1
   stepFeatures:
     0: 4
-    1: 6
+    1: 2
     2: 2
     3: 2
 HLT_2mu14_l2io_L12MU10:
@@ -177,7 +177,7 @@ HLT_2mu14_l2io_L12MU10:
     3: 1
   stepFeatures:
     0: 4
-    1: 9
+    1: 5
     2: 2
     3: 2
 HLT_2mu15_L12MU10:
@@ -189,7 +189,7 @@ HLT_2mu15_L12MU10:
     3: 1
   stepFeatures:
     0: 4
-    1: 6
+    1: 2
     2: 2
     3: 2
 HLT_2mu4_L12MU4:
@@ -201,7 +201,7 @@ HLT_2mu4_L12MU4:
     3: 2
   stepFeatures:
     0: 6
-    1: 12
+    1: 6
     2: 4
     3: 4
 HLT_2mu4_bBmumux_BcmumuPi_L12MU4:
@@ -317,7 +317,7 @@ HLT_2mu4_muonqual_L12MU4:
     3: 2
   stepFeatures:
     0: 6
-    1: 12
+    1: 6
     2: 4
     3: 4
 HLT_2mu6_10invm70_L1MU6:
@@ -329,7 +329,7 @@ HLT_2mu6_10invm70_L1MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 10
+    1: 4
     2: 4
     3: 4
 HLT_2mu6_Dr_L12MU4:
@@ -339,7 +339,7 @@ HLT_2mu6_Dr_L12MU4:
     1: 2
   stepFeatures:
     0: 6
-    1: 10
+    1: 4
 HLT_2mu6_L12MU6:
   eventCount: 2
   stepCounts:
@@ -349,7 +349,7 @@ HLT_2mu6_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 10
+    1: 4
     2: 4
     3: 4
 HLT_2mu6_bJpsimumu_L12MU6:
@@ -374,7 +374,7 @@ HLT_2mu6_bJpsimumul2io_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 13
+    1: 7
     2: 4
     3: 4
     4: 4
@@ -387,7 +387,7 @@ HLT_2mu6_l2io_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 13
+    1: 7
     2: 4
     3: 4
 HLT_2mu6_muonqual_L12MU6:
@@ -399,7 +399,7 @@ HLT_2mu6_muonqual_L12MU6:
     3: 2
   stepFeatures:
     0: 6
-    1: 10
+    1: 4
     2: 4
     3: 4
 HLT_3j200_L1J100:
@@ -2551,7 +2551,7 @@ HLT_mu10_L1MU10:
     3: 9
   stepFeatures:
     0: 12
-    1: 17
+    1: 12
     2: 13
     3: 11
 HLT_mu10_ivarmedium_mu10_10invm70_L12MU10:
@@ -2564,7 +2564,7 @@ HLT_mu10_ivarmedium_mu10_10invm70_L12MU10:
     4: 2
   stepFeatures:
     0: 10
-    1: 16
+    1: 8
     2: 8
     3: 8
     4: 2
@@ -2663,7 +2663,7 @@ HLT_mu14_L1MU10:
     3: 7
   stepFeatures:
     0: 12
-    1: 13
+    1: 8
     2: 8
     3: 8
 HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_03dRtt_L1MU10_TAU12IM_3J12:
@@ -2728,7 +2728,7 @@ HLT_mu14_tau25_mediumRNN_tracktwoMVA_xe50_cell_L1MU10_TAU12IM_XE35:
     8: 1
   stepFeatures:
     0: 4
-    1: 4
+    1: 3
     2: 3
     3: 3
     4: 6
@@ -2747,7 +2747,7 @@ HLT_mu20_2mu4noL1_L1MU20:
     5: 1
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 7
     3: 7
     4: 2
@@ -2788,7 +2788,7 @@ HLT_mu20_ivarmedium_mu4noL1_10invm70_L1MU20:
     6: 2
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 7
     3: 7
     4: 4
@@ -2806,7 +2806,7 @@ HLT_mu20_ivarmedium_mu8noL1_L1MU20:
     6: 1
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 7
     3: 7
     4: 4
@@ -2823,7 +2823,7 @@ HLT_mu22_2mu4noL1_L1MU20:
     5: 1
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
     4: 2
@@ -2839,7 +2839,7 @@ HLT_mu22_mu10noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
     4: 4
@@ -2855,7 +2855,7 @@ HLT_mu22_mu8noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
     4: 4
@@ -2869,7 +2869,7 @@ HLT_mu24_L1MU20:
     3: 5
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
 HLT_mu24_idperf_L1MU20:
@@ -2881,7 +2881,7 @@ HLT_mu24_idperf_L1MU20:
     3: 5
   stepFeatures:
     0: 7
-    1: 11
+    1: 7
     2: 6
     3: 6
 HLT_mu24_ivarmedium_L1MU20:
@@ -2894,7 +2894,7 @@ HLT_mu24_ivarmedium_L1MU20:
     4: 3
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
     4: 3
@@ -2909,7 +2909,7 @@ HLT_mu24_mu10noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
     4: 4
@@ -2925,7 +2925,7 @@ HLT_mu24_mu8noL1_L1MU20:
     5: 2
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 6
     4: 4
@@ -2939,7 +2939,7 @@ HLT_mu26_L1MU20:
     3: 4
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 5
 HLT_mu26_ivarmedium_L1MU20:
@@ -2952,7 +2952,7 @@ HLT_mu26_ivarmedium_L1MU20:
     4: 3
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 5
     4: 3
@@ -2966,7 +2966,7 @@ HLT_mu26_ivarperf_L1MU20:
     4: 4
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 5
     4: 5
@@ -2980,7 +2980,7 @@ HLT_mu28_ivarmedium_L1MU20:
     4: 3
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 6
     3: 4
     4: 3
@@ -2993,7 +2993,7 @@ HLT_mu4_l2io_L1MU4:
     3: 11
   stepFeatures:
     0: 14
-    1: 36
+    1: 30
     2: 15
     3: 15
 HLT_mu50_L1MU20:
@@ -3005,7 +3005,7 @@ HLT_mu50_L1MU20:
     3: 1
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 1
     3: 1
 HLT_mu50_RPCPEBSecondaryReadout_L1MU20:
@@ -3018,7 +3018,7 @@ HLT_mu50_RPCPEBSecondaryReadout_L1MU20:
     4: 1
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 1
     3: 1
     4: 1
@@ -3037,7 +3037,7 @@ HLT_mu60_L1MU20:
     3: 1
   stepFeatures:
     0: 10
-    1: 12
+    1: 7
     2: 1
     3: 1
 HLT_mu6_2mu4_bDimu2700_L1MU6_3MU4:
@@ -3053,7 +3053,7 @@ HLT_mu6_L1MU6:
     3: 10
   stepFeatures:
     0: 13
-    1: 18
+    1: 12
     2: 13
     3: 13
 HLT_mu6_LRT_idperf_l2lrt_L1MU6:
@@ -3073,7 +3073,7 @@ HLT_mu6_idperf_L1MU6:
     3: 10
   stepFeatures:
     0: 13
-    1: 19
+    1: 13
     2: 13
     3: 13
 HLT_mu6_ivarmedium_L1MU6:
@@ -3086,7 +3086,7 @@ HLT_mu6_ivarmedium_L1MU6:
     4: 6
   stepFeatures:
     0: 13
-    1: 18
+    1: 12
     2: 13
     3: 13
     4: 6
@@ -3099,7 +3099,7 @@ HLT_mu6_j45_nojcalib_L1J20:
     3: 9
   stepFeatures:
     0: 11
-    1: 14
+    1: 10
     2: 11
     3: 11
 HLT_mu6_msonly_L1MU6:
@@ -3119,7 +3119,7 @@ HLT_mu6_mu4_L12MU4:
     3: 2
   stepFeatures:
     0: 14
-    1: 23
+    1: 11
     2: 10
     3: 8
 HLT_mu6_mu6noL1_L1MU6:
@@ -3133,7 +3133,7 @@ HLT_mu6_mu6noL1_L1MU6:
     5: 3
   stepFeatures:
     0: 13
-    1: 18
+    1: 12
     2: 13
     3: 13
     4: 11
@@ -3148,7 +3148,7 @@ HLT_mu6_xe30_mht_L1XE10:
     4: 9
   stepFeatures:
     0: 12
-    1: 17
+    1: 11
     2: 12
     3: 12
     4: 9
@@ -3179,7 +3179,7 @@ HLT_mu8_L1MU6:
     3: 10
   stepFeatures:
     0: 13
-    1: 18
+    1: 12
     2: 13
     3: 13
 HLT_noalg_L1All:
-- 
GitLab