Skip to content
Snippets Groups Projects
Commit 14c31974 authored by Yohei Yamaguchi's avatar Yohei Yamaguchi Committed by Adam Edward Barton
Browse files

modify filtering for L2 inside-out

parent 6325287f
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ StatusCode MuonChainFilterAlg::execute()
bool pass = false;
//First check if there is anything in the filter list
if(m_filterChains.size()==0){
if(!m_notGate && m_filterChains.size()==0){
ATH_MSG_DEBUG("Nothing to filter");
setFilterPassed(true);
return StatusCode::SUCCESS;
......@@ -64,14 +64,27 @@ StatusCode MuonChainFilterAlg::execute()
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(it != m_filterChains.end()){
ATH_MSG_DEBUG("chain "<<chainName<<" is on the filter list, keep looking");
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{
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");
}
}
}
}
......
......@@ -41,6 +41,8 @@ class MuonChainFilterAlg : public AthAlgorithm
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" };
};
#endif
......@@ -151,6 +151,7 @@ def muCombAlgSequence(ConfigFlags):
insideoutMuonChainFilter.L2MuCombContainer = muNames.L2CBName+"IOmode"
insideoutMuonChainFilter.WriteMuFast = True
insideoutMuonChainFilter.WriteMuComb = True
insideoutMuonChainFilter.NotGate = True
muFastIOFilterSequence = seqAND("l2muFastIOFilterSequence", [insideoutMuonChainFilter, muFastIORecoSequence])
......@@ -610,11 +611,11 @@ def getInsideOutMuonChainNames():
chains =[]
try:
chains += [chain.name for chain in muonSlice if "l2io" not in chain.name]
chains += [chain.name for chain in muonSlice if "l2io" in chain.name]
except Exception as e:
log.debug(e)
try:
chains += [chain.name for chain in bphysSlice if "l2io" not in chain.name]
chains += [chain.name for chain in bphysSlice if "l2io" in chain.name]
except Exception as e:
log.debug(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment