Skip to content
Snippets Groups Projects
Commit 4619bc0c authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'comboHypoANDmode' into 'master'

[ATR-22697] Add ModeOR and EnableOverride flags to ComboHypoTool base

See merge request !45640
parents d28cf905 894b89cd
5 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45640[ATR-22697] Add ModeOR and EnableOverride flags to ComboHypoTool base
......@@ -108,6 +108,12 @@ public:
Gaudi::Property<size_t> m_combinationsThresholdBreak {this, "CombinationsThresholdBreak", 10000,
"Events processing this many combinations will generate a second WARNING message, and the loop over combinations will be terminated at this point."};
Gaudi::Property<bool> m_modeOR {this, "ModeOR", true,
"Accepts based on the logical OR over all calls to executeAlg. If this flag is set to false then the logical AND is required instead."};
Gaudi::Property<bool> m_enableOverride {this, "EnableOverride", false,
"Stops processing combinations as soon as a valid combination is found in OR mode, or as soon as an invalid combination is found in AND mode. This is to save CPU."};
// TODO - add optional write out of the data stored in passingCombinations in the decide function.
......
ApplicationMgr INFO Application Manager Configured successfully
EventLoopMgr WARNING Unable to locate service "EventSelector"
EventLoopMgr WARNING No events will be processed from external input.
......@@ -52,7 +51,7 @@ HLT_e25 SUCCESS Next Combination:
HLT_e25 SUCCESS -- HLT_e25 ID#3480115263 f:My_ELEC_Container i:1 pT:40
HLT_e25 SUCCESS Next Combination:
HLT_e25 SUCCESS -- HLT_e25 ID#3480115263 f:My_ELEC_Container i:2 pT:30
HLT_e25 DEBUG Passing 1 combinations out of 3, HLT_e25 ID#3480115263 **ACCEPTS** this event.
HLT_e25 DEBUG Passing 1 combinations out of 3, HLT_e25 ID#3480115263 **ACCEPTS** this event based on OR logic.
HLT_e25 DEBUG -- Passing combination 0 of 1
HLT_e25 DEBUG -- -- HLT_e25 ID#3480115263 container:HLTNav_Elec, index:0
HLT_e25 DEBUG ComboHypoToolBase: End of HLT_e25 ID#3480115263, passing elements are:
......@@ -88,7 +87,7 @@ HLT_e25_mu35 SUCCESS -- leg001_HLT_e25_mu35 ID#4271136129 f:My_MUON_Contain
HLT_e25_mu35 SUCCESS Next Combination:
HLT_e25_mu35 SUCCESS -- leg000_HLT_e25_mu35 ID#2563460054 f:My_ELEC_Container i:2 pT:30
HLT_e25_mu35 SUCCESS -- leg001_HLT_e25_mu35 ID#4271136129 f:My_MUON_Container i:1 pT:40
HLT_e25_mu35 DEBUG Passing 1 combinations out of 6, HLT_e25_mu35 ID#373038112 **ACCEPTS** this event.
HLT_e25_mu35 DEBUG Passing 1 combinations out of 6, HLT_e25_mu35 ID#373038112 **ACCEPTS** this event based on OR logic.
HLT_e25_mu35 DEBUG -- Passing combination 0 of 1
HLT_e25_mu35 DEBUG -- -- leg000_HLT_e25_mu35 ID#2563460054 container:HLTNav_Elec, index:0
HLT_e25_mu35 DEBUG -- -- leg001_HLT_e25_mu35 ID#4271136129 container:HLTNav_Muon, index:0
......@@ -120,7 +119,7 @@ HLT_e35_e35 SUCCESS -- leg001_HLT_e35_e35 ID#3593781442 f:My_ELEC_Containe
HLT_e35_e35 SUCCESS Next Combination:
HLT_e35_e35 SUCCESS -- leg000_HLT_e35_e35 ID#3620307964 f:My_ELEC_Container i:1 pT:40
HLT_e35_e35 SUCCESS -- leg001_HLT_e35_e35 ID#3593781442 f:My_ELEC_Container i:1 pT:40
HLT_e35_e35 DEBUG Passing 1 combinations out of 4, HLT_e35_e35 ID#3161969949 **ACCEPTS** this event.
HLT_e35_e35 DEBUG Passing 1 combinations out of 4, HLT_e35_e35 ID#3161969949 **ACCEPTS** this event based on OR logic.
HLT_e35_e35 DEBUG -- Passing combination 0 of 1
HLT_e35_e35 DEBUG -- -- leg000_HLT_e35_e35 ID#3620307964 container:HLTNav_Elec, index:0
HLT_e35_e35 DEBUG -- -- leg001_HLT_e35_e35 ID#3593781442 container:HLTNav_Elec, index:0
......@@ -158,7 +157,7 @@ HLT_2mu15 SUCCESS -- HLT_2mu15 ID#1058481211 f:My_MUON_Container i:3 pT:
HLT_2mu15 SUCCESS Next Combination:
HLT_2mu15 SUCCESS -- HLT_2mu15 ID#1058481211 f:My_MUON_Container i:2 pT:30
HLT_2mu15 SUCCESS -- HLT_2mu15 ID#1058481211 f:My_MUON_Container i:3 pT:20
HLT_2mu15 DEBUG Passing 3 combinations out of 6, HLT_2mu15 ID#1058481211 **ACCEPTS** this event.
HLT_2mu15 DEBUG Passing 3 combinations out of 6, HLT_2mu15 ID#1058481211 **ACCEPTS** this event based on OR logic.
HLT_2mu15 DEBUG -- Passing combination 0 of 3
HLT_2mu15 DEBUG -- -- HLT_2mu15 ID#1058481211 container:HLTNav_Muon, index:0
HLT_2mu15 DEBUG -- -- HLT_2mu15 ID#1058481211 container:HLTNav_Muon, index:1
......@@ -190,7 +189,7 @@ HLT_5mu5 SUCCESS -- HLT_5mu5 ID#1405614769 f:My_MUON_Container i:2 pT:3
HLT_5mu5 SUCCESS -- HLT_5mu5 ID#1405614769 f:My_MUON_Container i:3 pT:20
HLT_5mu5 SUCCESS -- HLT_5mu5 ID#1405614769 f:My_MUON_Container i:4 pT:10
HLT_5mu5 DEBUG Combination 0 decided to be passing
HLT_5mu5 DEBUG Passing 1 combinations out of 1, HLT_5mu5 ID#1405614769 **ACCEPTS** this event.
HLT_5mu5 DEBUG Passing 1 combinations out of 1, HLT_5mu5 ID#1405614769 **ACCEPTS** this event based on OR logic.
HLT_5mu5 DEBUG -- Passing combination 0 of 1
HLT_5mu5 DEBUG -- -- HLT_5mu5 ID#1405614769 container:HLTNav_Muon, index:0
HLT_5mu5 DEBUG -- -- HLT_5mu5 ID#1405614769 container:HLTNav_Muon, index:1
......@@ -307,7 +306,7 @@ HLT_2e25_3mu15 SUCCESS -- leg000_HLT_2e25_3mu15 ID#3088384102 f:My_ELEC_Conta
HLT_2e25_3mu15 SUCCESS -- leg001_HLT_2e25_3mu15 ID#4138555611 f:My_MUON_Container i:1 pT:40
HLT_2e25_3mu15 SUCCESS -- leg001_HLT_2e25_3mu15 ID#4138555611 f:My_MUON_Container i:2 pT:30
HLT_2e25_3mu15 SUCCESS -- leg001_HLT_2e25_3mu15 ID#4138555611 f:My_MUON_Container i:3 pT:20
HLT_2e25_3mu15 DEBUG Passing 6 combinations out of 12, HLT_2e25_3mu15 ID#270470543 **ACCEPTS** this event.
HLT_2e25_3mu15 DEBUG Passing 6 combinations out of 12, HLT_2e25_3mu15 ID#270470543 **ACCEPTS** this event based on OR logic.
HLT_2e25_3mu15 DEBUG -- Passing combination 0 of 6
HLT_2e25_3mu15 DEBUG -- -- leg000_HLT_2e25_3mu15 ID#3088384102 container:HLTNav_Elec, index:0
HLT_2e25_3mu15 DEBUG -- -- leg000_HLT_2e25_3mu15 ID#3088384102 container:HLTNav_Elec, index:1
......@@ -620,7 +619,7 @@ HLT_e35_2mu25_4j5 SUCCESS -- leg002_HLT_e35_2mu25_4j5 ID#862137673 f:My_JETS_Con
HLT_e35_2mu25_4j5 SUCCESS -- leg002_HLT_e35_2mu25_4j5 ID#862137673 f:My_JETS_Container i:2 pT:30
HLT_e35_2mu25_4j5 SUCCESS -- leg002_HLT_e35_2mu25_4j5 ID#862137673 f:My_JETS_Container i:3 pT:20
HLT_e35_2mu25_4j5 SUCCESS -- leg002_HLT_e35_2mu25_4j5 ID#862137673 f:My_JETS_Container i:4 pT:10
HLT_e35_2mu25_4j5 DEBUG Passing 8 combinations out of 30, HLT_e35_2mu25_4j5 ID#1056038866 **ACCEPTS** this event.
HLT_e35_2mu25_4j5 DEBUG Passing 8 combinations out of 30, HLT_e35_2mu25_4j5 ID#1056038866 **ACCEPTS** this event based on OR logic.
HLT_e35_2mu25_4j5 DEBUG -- Passing combination 0 of 8
HLT_e35_2mu25_4j5 DEBUG -- -- leg000_HLT_e35_2mu25_4j5 ID#572077314 container:HLTNav_Elec, index:0
HLT_e35_2mu25_4j5 DEBUG -- -- leg001_HLT_e35_2mu25_4j5 ID#1863374539 container:HLTNav_Muon, index:0
......@@ -957,7 +956,7 @@ HLT_2e35_e45_3m...SUCCESS -- leg002_HLT_2e35_e45_3mu15_mu35_j25 ID#873905799 f:M
HLT_2e35_e45_3m...SUCCESS -- leg002_HLT_2e35_e45_3mu15_mu35_j25 ID#873905799 f:My_MUON_Container i:3 pT:20
HLT_2e35_e45_3m...SUCCESS -- leg003_HLT_2e35_e45_3mu15_mu35_j25 ID#1315781797 f:My_MUON_Container i:1 pT:40
HLT_2e35_e45_3m...SUCCESS -- leg004_HLT_2e35_e45_3mu15_mu35_j25 ID#4003323228 f:My_JETS_Container i:2 pT:30
HLT_2e35_e45_3m... DEBUG Passing 3 combinations out of 24, HLT_2e35_e45_3mu15_mu35_j25 ID#1413975787 **ACCEPTS** this event.
HLT_2e35_e45_3m... DEBUG Passing 3 combinations out of 24, HLT_2e35_e45_3mu15_mu35_j25 ID#1413975787 **ACCEPTS** this event based on OR logic.
HLT_2e35_e45_3m... DEBUG -- Passing combination 0 of 3
HLT_2e35_e45_3m... DEBUG -- -- leg000_HLT_2e35_e45_3mu15_mu35_j25 ID#1296237030 container:HLTNav_Elec, index:0
HLT_2e35_e45_3m... DEBUG -- -- leg000_HLT_2e35_e45_3mu15_mu35_j25 ID#1296237030 container:HLTNav_Elec, index:1
......
......@@ -101,17 +101,25 @@ StatusCode ComboHypoToolBase::decide(Combo::LegDecisionsMap& passingLegs, const
}
}
++iterations;
try {
if (executeAlg(combinationToCheck)) {
ATH_MSG_DEBUG("Combination " << iterations << " decided to be passing");
ATH_MSG_DEBUG("Combination " << (iterations - 1) << " decided to be passing");
passingCombinations.push_back(combinationToCheck);
if (m_modeOR == true and m_enableOverride) {
break;
}
} else { // the combination failed
if (m_modeOR == false and m_enableOverride) {
break;
}
}
} catch (std::exception& e) {
ATH_MSG_ERROR(e.what());
return StatusCode::FAILURE;
}
++iterations;
if ((iterations >= m_combinationsThresholdWarn && warnings == 0) or (iterations >= m_combinationsThresholdBreak)) {
ATH_MSG_WARNING("Have so far processed " << iterations << " combinations for " << m_decisionId << " in this event, " << passingCombinations.size() << " passing.");
++warnings;
......@@ -123,8 +131,32 @@ StatusCode ComboHypoToolBase::decide(Combo::LegDecisionsMap& passingLegs, const
} while (nucg);
ATH_MSG_DEBUG("Passing " << passingCombinations.size() << " combinations out of " << iterations << ", "
<< m_decisionId << (passingCombinations.size() ? " **ACCEPTS**" : " **REJECTS**") << " this event.");
if (m_modeOR) {
ATH_MSG_DEBUG("Passing " << passingCombinations.size() << " combinations out of " << iterations << ", "
<< m_decisionId << (passingCombinations.size() ? " **ACCEPTS**" : " **REJECTS**") << " this event based on OR logic.");
if (m_enableOverride) {
ATH_MSG_DEBUG("Note: stopped after the first successful combination due to the EnableOverride flag.");
}
} else { // modeAND
const bool passAll = (passingCombinations.size() == iterations);
ATH_MSG_DEBUG("Passing " << passingCombinations.size() << " combinations out of " << iterations << ", "
<< m_decisionId << (passAll ? " **ACCEPTS**" : " **REJECTS**") << " this event based on AND logic.");
if (m_enableOverride) {
ATH_MSG_DEBUG("Note: stopped after the first failed combination due to the EnableOverride flag.");
}
if (not passAll) {
passingCombinations.clear();
}
}
if (not passingCombinations.empty()) { // need partial erasure of the decsions (only those not present in any combination)
updateLegDecisionsMap(passingCombinations, passingLegs);
......
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