Skip to content
Snippets Groups Projects
Commit 569c170d authored by Teng Jian Khoo's avatar Teng Jian Khoo Committed by Frank Winklmeier
Browse files

Translate from leg ID to chain ID when checking active HLT jet chains

parent 9e417a04
No related branches found
No related tags found
No related merge requests found
......@@ -371,18 +371,24 @@ def _tests():
from TriggerMenuMT.HLTMenuConfig.Menu import DictFromChainName
from TrigHLTJetHypo.ChainLabelParser import ChainLabelParser
from TriggerMenuMT.HLTMenuConfig.Menu.ChainDefInMenu import ChainProp
from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import MultiJetGroup
chain_names = (
chains = (
'HLT_j85_L1J20',
# 'HLT_j80_0eta240_2j60_320eta490_L1J20',
# ``'HLT_j85_j70_L1J20',
ChainProp(name='HLT_j85_j70_L1J20', l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup),
ChainProp(name='HLT_j80_0eta240_2j60_320eta490_L1J20', l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup),
'HLT_j0_vbenfSEP30etSEP34mass35SEP50fbet_L1J20',
'HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20',
ChainProp(name='HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20', l1SeedThresholds=['FSNOSEED']*3, groups=MultiJetGroup),
)
for cn in chain_names:
for cn in chains:
# Contrary to the function name, this requires a ChainProp
# though it will generate a basic one if a string is given
# Needs the ChainProp when we have multiple chainParts
# to avoid mismatch in L1 threshold multiplicity
chain_dict = DictFromChainName.dictFromChainName(cn)
label = chainDict2jetLabel(chain_dict)
......
......@@ -2,6 +2,7 @@
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
*/
#include <algorithm>
#include "GaudiKernel/Property.h"
#include "TrigJetHypoAlgMT.h"
#include "TrigCompositeUtils/HLTIdentifier.h"
......@@ -33,6 +34,7 @@ StatusCode TrigJetHypoAlgMT::execute( const EventContext& context ) const {
// The container should have only one such Decision (for L1) as deding
// on jets is a one step process.
ATH_MSG_DEBUG("Retrieving L1 decision \"" << decisionInput().key() << "\"");
auto h_prevDecisions = SG::makeHandle(decisionInput(), context );
if( not h_prevDecisions.isValid() || h_prevDecisions->size() ==0) {//implicit
......@@ -107,9 +109,30 @@ TrigJetHypoAlgMT::decide(const xAOD::JetContainer* jets,
TrigCompositeUtils::decisionIDs(previousDecision).begin(),
TrigCompositeUtils::decisionIDs(previousDecision).end()
};
if (msgLvl(MSG::DEBUG)) {
msg() << "IDs of active legs:" << endmsg;
for(auto decisionID: previousDecisionIDs) {
msg() << " " << decisionID << endmsg;
}
}
// Some of these may be leg IDs, convert those to the chain ID
TrigCompositeUtils::DecisionIDContainer leglessPreviousDecisionIDs;
std::transform(previousDecisionIDs.begin(), previousDecisionIDs.end(),
std::inserter(leglessPreviousDecisionIDs,leglessPreviousDecisionIDs.begin()),
[] (TrigCompositeUtils::DecisionID id) -> TrigCompositeUtils::DecisionID
{return TrigCompositeUtils::getIDFromLeg(HLT::Identifier(id)).numeric();}
);
if (msgLvl(MSG::DEBUG)) {
msg() << "IDs of active chains:" << endmsg;
for(auto decisionID: leglessPreviousDecisionIDs) {
msg() << " " << decisionID << endmsg;
}
}
for (const auto& tool: m_hypoTools) {
CHECK(tool->decide(jets, previousDecisionIDs, jetHypoInputs));
ATH_MSG_DEBUG("Now computing decision for " << tool->name());
CHECK(tool->decide(jets, leglessPreviousDecisionIDs, jetHypoInputs));
}
return StatusCode::SUCCESS;
......
......@@ -66,7 +66,8 @@ TrigJetHypoToolMT::decide(const xAOD::JetContainer* jets,
if (not TrigCompositeUtils::passed(getId().numeric(), previousDecisionIDs)) {
// This HypoTool's chain is not active -
// we must not check this tool's logic.
ATH_MSG_DEBUG("Previous decisionID not found for " << getId().numeric() << " - exiting.");
return StatusCode::SUCCESS;
}
......@@ -126,7 +127,7 @@ TrigJetHypoToolMT::decide(const xAOD::JetContainer* jets,
participating_jets.end(),
pair.first);
if (it != participating_jets.end()) {
ATH_MSG_VERBOSE("Passing jet: pt " << (*it)->pt() << ", eta " << (*it)->eta() );
// This jet particpated in passing the event.
// Add this HypoTool's ID to this Decision object.
......
......@@ -22,6 +22,9 @@ TrigSignatureMoniMT INFO -- #3965466087 Features
TrigSignatureMoniMT INFO HLT_2j330_a10t_lcw_jes_35smcINF_L1J100 #1295975955
TrigSignatureMoniMT INFO -- #1295975955 Events 3 3 0 - - - - - 0
TrigSignatureMoniMT INFO -- #1295975955 Features 0 - - - - -
TrigSignatureMoniMT INFO HLT_2j60_L1J15 #927735533
TrigSignatureMoniMT INFO -- #927735533 Events 20 20 10 - - - - - 10
TrigSignatureMoniMT INFO -- #927735533 Features 28 - - - - -
TrigSignatureMoniMT INFO HLT_2mu14_L12MU10 #2619091790
TrigSignatureMoniMT INFO -- #2619091790 Events 3 3 3 1 1 1 - - 1
TrigSignatureMoniMT INFO -- #2619091790 Features 12 4 4 4 - -
......@@ -268,9 +271,12 @@ TrigSignatureMoniMT INFO -- #436385969 Features
TrigSignatureMoniMT INFO HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20 #3634067472
TrigSignatureMoniMT INFO -- #3634067472 Events 19 19 0 - - - - - 0
TrigSignatureMoniMT INFO -- #3634067472 Features 0 - - - - -
TrigSignatureMoniMT INFO HLT_j80_L1J15 #2440872308
TrigSignatureMoniMT INFO -- #2440872308 Events 20 20 13 - - - - - 13
TrigSignatureMoniMT INFO -- #2440872308 Features 23 - - - - -
TrigSignatureMoniMT INFO HLT_j80_j60_L1J15 #582699527
TrigSignatureMoniMT INFO -- #582699527 Events 20 20 0 - - - - - 0
TrigSignatureMoniMT INFO -- #582699527 Features 0 - - - - -
TrigSignatureMoniMT INFO -- #582699527 Events 20 20 8 - - - - - 8
TrigSignatureMoniMT INFO -- #582699527 Features 23 - - - - -
TrigSignatureMoniMT INFO HLT_j85_L1J20 #510475538
TrigSignatureMoniMT INFO -- #510475538 Events 19 19 13 - - - - - 13
TrigSignatureMoniMT INFO -- #510475538 Features 21 - - - - -
......
......@@ -22,6 +22,9 @@ TrigSignatureMoniMT INFO -- #3965466087 Features
TrigSignatureMoniMT INFO HLT_2j330_a10t_lcw_jes_35smcINF_L1J100 #1295975955
TrigSignatureMoniMT INFO -- #1295975955 Events 20 20 0 - - - - - 0
TrigSignatureMoniMT INFO -- #1295975955 Features 0 - - - - -
TrigSignatureMoniMT INFO HLT_2j60_L1J15 #927735533
TrigSignatureMoniMT INFO -- #927735533 Events 20 20 0 - - - - - 0
TrigSignatureMoniMT INFO -- #927735533 Features 0 - - - - -
TrigSignatureMoniMT INFO HLT_2mu14_L12MU10 #2619091790
TrigSignatureMoniMT INFO -- #2619091790 Events 20 20 0 0 0 0 - - 0
TrigSignatureMoniMT INFO -- #2619091790 Features 0 0 0 0 - -
......@@ -277,6 +280,9 @@ TrigSignatureMoniMT INFO -- #436385969 Features
TrigSignatureMoniMT INFO HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20 #3634067472
TrigSignatureMoniMT INFO -- #3634067472 Events 20 20 0 - - - - - 0
TrigSignatureMoniMT INFO -- #3634067472 Features 0 - - - - -
TrigSignatureMoniMT INFO HLT_j80_L1J15 #2440872308
TrigSignatureMoniMT INFO -- #2440872308 Events 20 20 3 - - - - - 3
TrigSignatureMoniMT INFO -- #2440872308 Features 3 - - - - -
TrigSignatureMoniMT INFO HLT_j80_j60_L1J15 #582699527
TrigSignatureMoniMT INFO -- #582699527 Events 20 20 0 - - - - - 0
TrigSignatureMoniMT INFO -- #582699527 Features 0 - - - - -
......
......@@ -89,7 +89,9 @@ def setupMenu():
ChainProp(name='HLT_5j70_0eta240_L14J20', groups=MultiJetGroup), # this chain is supposed to be seeded off L1_4J15 in principle, needs CF fix
ChainProp(name='HLT_3j200_L1J100', groups=MultiJetGroup),
# FP: workaround tmp for l1SeedThresholds
ChainProp(name='HLT_j80_j60_L1J15', l1SeedThresholds=['FSNOSEED']*2, groups=MultiJetGroup),
ChainProp(name='HLT_j80_L1J15', groups=SingleJetGroup),
ChainProp(name='HLT_2j60_L1J15', groups=MultiJetGroup),
ChainProp(name='HLT_j80_j60_L1J15', l1SeedThresholds=2*['FSNOSEED'], groups=MultiJetGroup),
# FP: workaround tmp for l1SeedThresholds
ChainProp(name='HLT_j80_0eta240_2j60_320eta490_j0_dijetSEP80j1etSEP0j1eta240SEP80j2etSEP0j2eta240SEP700djmass_L1J20', l1SeedThresholds=['FSNOSEED']*3, groups=MultiJetGroup),
]
......
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