diff --git a/Trigger/TrigSteer/DecisionHandling/python/EmuStepProcessingConfig.py b/Trigger/TrigSteer/DecisionHandling/python/EmuStepProcessingConfig.py index 70edfdc2265f1c3fdec4ec29d9772e0dd93d8c24..6283edb830230436993faeab209a5f383efd7632 100644 --- a/Trigger/TrigSteer/DecisionHandling/python/EmuStepProcessingConfig.py +++ b/Trigger/TrigSteer/DecisionHandling/python/EmuStepProcessingConfig.py @@ -330,22 +330,17 @@ def generateChainsManually(): makeChainStep("Step1_2muAs_empty", multiplicity=[]), makeChainStep("Step2_2muAs", [mu21, mu21], multiplicity=[1,1]) ]) ] - # TODO not clear if this test is correct actually, restore when discussed - # from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import dictFromChainName - # from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDictInLegs - # # test change of multiplicity - # chainName = 'HLT_TestChain5_ev1_TestChain8_ev1_merge_L12EM3' - # cd = dictFromChainName(chainName ) - # cdicts = splitChainDictInLegs(cd) - # import pprint - # pprint.pprint(cd) - # pprint.pprint(cdicts) - - # CombChains += [ makeChain(name = chainName, L1Thresholds = ["EM3", "EM3"], ChainSteps=[ - # makeChainStep("Step1_em1merged", [el11], multiplicity = [1], chainDicts = [cdicts[0]] ), - # makeChainStep("Step2_em1merged", [el21, el22], multiplicity = [1,1]) - # ]) - # ] + from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import dictFromChainName + from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainDictInLegs + # test change of multiplicity + chainName = 'HLT_TestChain5_ev1_TestChain8_ev1_merge_L12EM3' + cd = dictFromChainName(chainName ) + cdicts = splitChainDictInLegs(cd) + CombChains += [ makeChain(name = chainName, L1Thresholds = ["EM3", "EM3"], ChainSteps=[ + makeChainStep("Step1_em1merged", [el11], multiplicity = [1], chainDicts = [cdicts[0]] ), + makeChainStep("Step2_em1merged", [el21, el22], multiplicity = [1,1], chainDicts = cdicts) + ]) + ] HLTChains += CombChains diff --git a/Trigger/TrigSteer/DecisionHandling/share/emu_step_processing.ref b/Trigger/TrigSteer/DecisionHandling/share/emu_step_processing.ref index 29d871177bbe8798b61f9d8add6c33b63a27c508..5a9f70e7ae9d56b7e2f19f128c0ecaa30645dc62 100644 --- a/Trigger/TrigSteer/DecisionHandling/share/emu_step_processing.ref +++ b/Trigger/TrigSteer/DecisionHandling/share/emu_step_processing.ref @@ -138,6 +138,9 @@ TrigSignatureMoni INFO -- #18202 TrigSignatureMoni INFO HLT_TestChain5_ev1_TestChain8_ev1_L12EM3 #2709794009 TrigSignatureMoni INFO -- #2709794009 Events 1 1 1 1 - - 1 TrigSignatureMoni INFO -- #2709794009 Features 4 4 - - +TrigSignatureMoni INFO HLT_TestChain5_ev1_TestChain8_ev1_merge_L12EM3 #3022516030 +TrigSignatureMoni INFO -- #3022516030 Events 1 1 0 0 - - 0 +TrigSignatureMoni INFO -- #3022516030 Features 2 0 - - TrigSignatureMoni INFO HLT_TestChain5_ev2_L1EM7 #1760405581 TrigSignatureMoni INFO -- #1760405581 Events 0 0 0 0 - - 0 TrigSignatureMoni INFO -- #1760405581 Features 0 0 - - diff --git a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt index ed6f7f2d1de305b1376c26451a6860aef25e4004..ae14c72b0d83044c17844b4c808f3d0c34cac8eb 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt +++ b/Trigger/TriggerCommon/TriggerMenuMT/CMakeLists.txt @@ -157,14 +157,6 @@ atlas_add_test( full_menu_cf PROPERTIES TIMEOUT 500 POST_EXEC_SCRIPT nopost.sh ) -file( REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_LS2_emu_menu_DH ) -file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_LS2_emu_menu_DH ) -atlas_add_test( LS2_emu_menu_DH - SCRIPT test_emu_step_menu_processing.sh - PROPERTIES WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_LS2_emu_menu_DH - PROPERTIES TIMEOUT 500 - POST_EXEC_SCRIPT nopost.sh ) - file( REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_EventBuildingSequenceSetup ) file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_EventBuildingSequenceSetup ) atlas_add_test( EventBuildingSequenceSetup diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py index c26084f8187cb60499add1870a727d43efb634c0..9b4dc90aeb39afc20b923ba44e56de1847fe6c4b 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py @@ -154,7 +154,7 @@ class JetChainConfiguration(ChainConfigurationBase): threshold = preselParts[1] chainPartName = multiplicity+'j'+threshold if multiplicity != '1' else 'j'+threshold preselJetParts.update( - {'L1threshold': 'NOL1SEED', + {'L1threshold': 'J', 'TLA': '', 'addInfo': [], 'bConfig': [], diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py index 6575340142d3ddf8e316eb3cffa150087a9f972c..a83ccf344f01ca81c05fe1f5378e7ecc481b6342 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py @@ -37,6 +37,7 @@ from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFDot import stepCF_DataFlow_to_dot, s from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming from AthenaCommon.Configurable import Configurable from AthenaCommon.CFElements import getSequenceChildren, isSequence, compName +from L1Decoder.L1DecoderConfig import mapThresholdToL1DecisionCollection import re @@ -392,8 +393,14 @@ def createDataFlow(chains, allDicts): lastDecisions = [] for nstep, chainStep in enumerate( chain.steps ): log.debug("\n************* Start connecting step %d %s for chain %s", nstep+1, chainStep.name, chain.name) + if nstep == 0: + if chainStep.stepDicts: + filterInput = [ mapThresholdToL1DecisionCollection(p["chainParts"][0]["L1threshold"]) for p in chainStep.stepDicts] + else: + filterInput = chain.L1decisions + else: + filterInput = lastDecisions - filterInput = chain.L1decisions if nstep == 0 else lastDecisions if len(filterInput) == 0 : log.error("[createDataFlow] Filter for step %s has %d inputs! At least one is expected", chainStep.name, len(filterInput)) raise Exception("[createDataFlow] Cannot proceed, exiting.") @@ -408,7 +415,7 @@ def createDataFlow(chains, allDicts): log.error("Found %d inputs to step %s having multiplicity %d", len(filterInput), chainStep.name, len(chainStep.multiplicity)) raise Exception("[createDataFlow] Cannot proceed, exiting.") - log.debug("Set Filter input: %s", filterInput) + log.debug("Set Filter input: %s while setting the chain: %s", filterInput, chain.name) # make one filter per step: @@ -445,7 +452,7 @@ def createDataFlow(chains, allDicts): # add chains to the filter: chainLegs = chainStep.getChainLegs() if len(chainLegs) != len(filterInput): - log.error("[createDataFlow] chainlegs = %i differ from inputs=%i", len(chainLegs), len(filterInput)) + log.error("[createDataFlow] lengths of chainlegs = %s differ from inputs=%s", str(chainLegs), str(filterInput)) raise Exception("[createDataFlow] Cannot proceed, exiting.") for finput, leg in zip(filterInput, chainLegs): sequenceFilter.addChain(leg, finput) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py index d4bf12d89a72b4d6d7013d24cd3485508ffeec67..1140c146160ea642e15da4ba6bffd9325dad5f93 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py @@ -8,6 +8,8 @@ from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming from AthenaCommon.CFElements import parOR, seqAND, compName, getProp from DecisionHandling.DecisionHandlingConfig import ComboHypoCfg from AthenaConfiguration.ComponentFactory import CompFactory +from L1Decoder.L1DecoderConfig import mapThresholdToL1DecisionCollection + RoRSeqFilter=CompFactory.RoRSeqFilter PassFilter = CompFactory.PassFilter @@ -584,7 +586,6 @@ class Chain(object): self.vseeds=L1Thresholds - from L1Decoder.L1DecoderConfig import mapThresholdToL1DecisionCollection # L1decisions are used to set the seed type (EM, MU,JET), removing the actual threshold # in practice it is the L1Decoder Decision output self.L1decisions = [ mapThresholdToL1DecisionCollection(stri) for stri in L1Thresholds] @@ -674,14 +675,7 @@ class Chain(object): return for step in self.steps: - # TODO: make this as an error when exceptions are handled - if len(self.L1decisions) != len(step.sequences) and not step.isEmpty: - log.error("setSeedsToSequences: found %d L1seeds and %d sequences in chain %s step %s: is this correct?", len(self.L1decisions), len(step.sequences),self.name, step.name) - raise RuntimeError("[setSeedsToSequences] L1 seeding issue") - for seed, seq in zip(self.L1decisions, step.sequences): - seq.setSeed( seed ) - log.debug( "setSeedsToSequences: Chain %s adding seed %s to sequence in step %s", self.name, seed, step.name ) - + step.setSeedsToSequences() def createHypoTools(self): """ This is extrapolating the hypotool configuration from the chain name""" @@ -895,6 +889,12 @@ class ChainStep(object): return list(self.combo.getChains()) return self.getChainLegs() + def setSeedsToSequences(self): + for seed, seq in zip( [d["chainParts"][0]["L1threshold"] for d in self.stepDicts], self.sequences): + l1Collection = mapThresholdToL1DecisionCollection(seed) + seq.setSeed( l1Collection ) + log.debug( "setSeedsToSequences: ChainStep %s adding seed %s to sequence %s", self.name, l1Collection, seq.name ) + def __repr__(self): if len(self.sequences) == 0: return "--- ChainStep %s ---\n is Empty, ChainDict = %s "%(self.name, ' '.join(map(str, [dic['chainName'] for dic in self.stepDicts])) )