Commit d3bcc0e9 authored by Vladimir Lyubushkin's avatar Vladimir Lyubushkin Committed by Frank Winklmeier
Browse files

Fix bug in MuonChainFilterAlg and configure BLS specific dimuL2Sequence...

Fix bug in MuonChainFilterAlg and configure BLS specific dimuL2Sequence (successor of muComb for BLS) trigger sequence (ATR-22832)
parent 028e3eac
/*
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;
}
/*
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
# 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
......
# 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
# 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]
......
/*
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,24 @@ 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;
}
// 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;
}
......@@ -34,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);
......@@ -43,26 +62,48 @@ StatusCode TrigBphysStreamerHypo::execute( const EventContext& context ) const {
for (const Decision* previousDecision : *previousDecisionsHandle) {
Decision* decision = TrigCompositeUtils::newDecisionIn(decisions, previousDecision, TrigCompositeUtils::hypoAlgNodeName(), context);
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);
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_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);
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) );
......
/*
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,10 @@ class TrigBphysStreamerHypo : public ::HypoBase {
private:
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
......@@ -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])
......@@ -52,23 +52,53 @@ 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(
name = 'DimuL2StreamerHypoAlg',
triggerList = getDefaultChainNames(),
triggerLevel = 'L2')
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(
name = 'IM_bphysStreamerDimu',