diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py index b4dfdc98fd09ce3772b977bbb1bdfd91f1086bfb..67de7b6f233c8475ddbdb9ad8cb4cae862b4cbdd 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/generateElectron.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -from TrigUpgradeTest.ElectronMenuConfig import l2CaloRecoCfg, l2CaloHypoCfg +from TrigUpgradeTest.ElectronMenuConfig import l2CaloRecoCfg, l2CaloHypoCfg, l2CaloAlgCfg from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, \ ChainStep, Chain, RecoFragmentsPool, getChainStepName @@ -20,21 +20,38 @@ def generateChains( flags, chainDict ): acc = ComponentAccumulator() - l2CaloHypo = RecoFragmentsPool.retrieve( l2CaloHypoCfg, - flags, - name = 'L2ElectronCaloHypo', - CaloClusters = 'L2CaloEMClusters' ) + l2CaloHypo = TrigL2CaloHypoAlgMT('L2ElectronCaloHypo') + l2CaloHypo.CaloClusters = 'L2CaloEMClusters' + + l2CaloHypoTool = TrigL2CaloHypoToolFromName(chainDict['chainName'], chainDict['chainName']) + l2CaloHypo.HypoTools = [l2CaloHypoTool] + + # l2CaloHypo = RecoFragmentsPool.retrieve(l2CaloHypoCfg, + # flags, + # name = 'L2ElectronCaloHypo', + # CaloClusters = 'L2CaloEMClusters' ) + + + # from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import InViewReco + # l2CaloReco = InViewReco("FastCaloEMReco") + # algAcc, alg = l2CaloAlgCfg(flags, roisKey=l2CaloReco.name + 'RoIs') + # l2CaloReco.addRecoAlg(alg) + # l2CaloReco.merge(algAcc) l2CaloReco = RecoFragmentsPool.retrieve(l2CaloRecoCfg, flags) + # l2CaloReco.addHypoAlg(l2CaloHypo) acc.merge(l2CaloReco) + # acc.addEventAlgo(l2CaloHypo) + fastCaloSequence = MenuSequence( Sequence = l2CaloReco.sequence(), Maker = l2CaloReco.inputMaker(), Hypo = l2CaloHypo, - HypoToolGen = TrigL2CaloHypoToolFromName ) + HypoToolGen = None ) fastCaloStep = ChainStep(getChainStepName('Electron', 1), [fastCaloSequence]) + # # # fast ID from TrigUpgradeTest.InDetConfig import indetInViewRecoCfg diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py index 443123e6fa5031a12be238f6b28687194493aca2..15114143c4e6b9dfac5b884d50f53400644c95ab 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py @@ -6,6 +6,7 @@ from AthenaCommon.Logging import logging from AthenaCommon.AlgSequence import dumpSequence from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFDot import stepCF_DataFlow_to_dot, stepCF_ControlFlow_to_dot, all_DataFlow_to_dot from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator import sys import copy @@ -19,8 +20,9 @@ def makeSummary(name, flatDecisions): """ Returns a TriggerSummaryAlg connected to given decisions""" from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg summary = TriggerSummaryAlg( name, OutputLevel = 2 ) - summary.InputDecision = "L1DecoderSummary" + summary.InputDecision = "L1DecoderSummary" summary.FinalDecisions = flatDecisions + # summary.HLTSummary = "MonitoringSummary" + name return summary @@ -295,7 +297,7 @@ def decisionTree_From_Chains(HLTNode, chains): #end of loop over chains for this step, now implement CF: log.debug("\n******** Create CF Tree %s with AthSequencers", stepCF_name) - + #first make the filter step stepFilter = createStepFilterNode(stepCF_name, CFseq_list, dump=False) HLTNode += stepFilter @@ -341,7 +343,7 @@ def generateDecisionTree(HLTNode, chains): ## Fill chain steps matrix for chain in chains: - chain.decodeHypoToolConfs() + # chain.decodeHypoToolConfs() for stepNumber, chainStep in enumerate(chain.steps): chainName = chainStep.name.split('_')[0] chainStepsMatrix[stepNumber][chainName].append(chain) @@ -375,6 +377,7 @@ def generateDecisionTree(HLTNode, chains): sfilter = buildFilter(filterName, filter_input) chainStep = firstChain.steps[nstep] + CFseq = CFSequence( ChainStep=chainStep, FilterAlg=sfilter ) CFsequences.append( CFseq ) @@ -432,7 +435,7 @@ def buildFilter(filter_name, filter_input): sfilter = RoRSequenceFilterNode(name=filter_name) for i in filter_input: sfilter.addInput(i) for i in filter_input: sfilter.addOutput(CFNaming.filterOutName(filter_name, i)) - + log.debug("Added inputs to filter: %s", sfilter.getInputList()) log.debug("Added outputs to filter: %s", sfilter.getOutputList()) log.debug("Filter Done: %s", sfilter.Alg.name()) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py index 492d8056da53f0e31dbff4229422ca268b8f3597..82d578419181e9136b3516408bb41827a8e72934 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py @@ -566,6 +566,9 @@ class InViewReco( ComponentAccumulator ): log.warning( "InViewReco.addRecoAlgo: consider using mergeReco that takes care of the CA accumulation and moving algorithms" ) self.addEventAlgo( alg, self.viewsSeq.name() ) + def addHypoAlg(self, alg): + self.addEventAlgo( alg, self.mainSeq.name() ) + def sequence( self ): return self.mainSeq diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py index 04ff5cd6e0b0069944089b8225035e8fa6e22f88..72151f699c2002deb6c4b35f5f943af24d9ed4ed 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/generateMuon.py @@ -5,6 +5,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from TrigUpgradeTest.MuonMenuConfig import l2MuFastRecoCfg, l2MuFastHypoCfg from TrigMuonHypoMT.TrigMuonHypoMTConfig import TrigMufastHypoToolFromName +from TrigMuonHypo.TrigMuonHypoConf import TrigMufastHypoAlg def generateChains( flags, chainDict ): @@ -12,24 +13,31 @@ def generateChains( flags, chainDict ): acc = ComponentAccumulator() ### Set muon step1 ### - l2muFastHypo = RecoFragmentsPool.retrieve( l2MuFastHypoCfg, - flags, - name = "TrigL2MuFastHypo", - muFastInfo = "MuonL2SAInfo" ) + # l2muFastHypo = RecoFragmentsPool.retrieve( l2MuFastHypoCfg, + # flags, + # name = "TrigL2MuFastHypo", + # muFastInfo = "MuonL2SAInfo" ) + + l2muFastHypo = TrigMufastHypoAlg('TrigL2MuFastHypo') + l2muFastHypo.MuonL2SAInfoFromMuFastAlg = 'MuonL2SAInfo' + + l2muFastHypoTool = TrigMufastHypoToolFromName(chainDict['chainName'], chainDict['chainName']) + l2muFastHypo.HypoTools = [l2muFastHypoTool] l2muFastReco = RecoFragmentsPool.retrieve( l2MuFastRecoCfg, flags ) + # l2muFastReco.addHypoAlg(l2muFastHypo) acc.merge( l2muFastReco ) l2muFastSequence = MenuSequence( Sequence = l2muFastReco.sequence(), Maker = l2muFastReco.inputMaker(), Hypo = l2muFastHypo, - HypoToolGen = TrigMufastHypoToolFromName ) + HypoToolGen = None) l2muFastStep = ChainStep( getChainStepName('Muon', 1), [l2muFastSequence] ) ### Set muon step2 ### # Please set up L2muComb step here - + import pprint pprint.pprint(chainDict) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py index 91f398d5d2e65b285e4bcc7ad6e21d77672ea3fd..ffb3bf458f96bdffb949768ebb8e86bff19982b0 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/generatePhoton.py @@ -15,33 +15,52 @@ from TrigEgammaHypo.TrigL2PhotonHypoTool import TrigL2PhotonHypoToolFromName def generateChains(flags, chainDict): acc = ComponentAccumulator() - l2CaloHypo = RecoFragmentsPool.retrieve(l2CaloHypoCfg, - flags, - name='L2PhotonCaloHypo', - CaloClusters='L2CaloEMClusters') + # l2CaloHypo = RecoFragmentsPool.retrieve(l2CaloHypoCfg, + # flags, + # name='L2PhotonCaloHypo', + # CaloClusters='L2CaloEMClusters') + + l2CaloHypo = TrigL2CaloHypoAlgMT('L2PhotonCaloHypo') + l2CaloHypo.CaloClusters = 'L2CaloEMClusters' + + l2CaloHypoTool = TrigL2CaloHypoToolFromName(chainDict['chainName'], chainDict['chainName']) + l2CaloHypo.HypoTools = [l2CaloHypoTool] l2CaloReco = RecoFragmentsPool.retrieve(l2CaloRecoCfg, flags) + # l2CaloReco.addHypoAlg(l2CaloHypo) acc.merge(l2CaloReco) - fastCaloSequence = MenuSequence(Sequence=l2CaloReco.sequence(), - Maker=l2CaloReco.inputMaker(), - Hypo=l2CaloHypo, - HypoToolGen=TrigL2CaloHypoToolFromName) + fastCaloSequence = MenuSequence( Sequence = l2CaloReco.sequence(), + Maker = l2CaloReco.inputMaker(), + Hypo = l2CaloHypo, + HypoToolGen = None ) fastCaloStep = ChainStep(getChainStepName('Photon', 1), [fastCaloSequence]) + # l2PhotonHypo = RecoFragmentsPool.retrieve(l2PhotonHypoCfg, + # flags, + # Photons='L2Photons', + # RunInView=True) + + l2PhotonHypo = TrigL2PhotonHypoAlgMT() + l2PhotonHypo.Photons = 'L2Photons' + l2PhotonHypo.RunInView = True + + from AthenaCommon.Constants import VERBOSE + l2PhotonHypo.OutputLevel = VERBOSE + + l2PhotonHypoTool = TrigL2PhotonHypoToolFromName(chainDict['chainName'], chainDict['chainName']) + l2PhotonHypo.HypoTools = [l2PhotonHypoTool] + l2PhotonReco = RecoFragmentsPool.retrieve(l2PhotonRecoCfg, flags) + # l2PhotonReco.addHypoAlg(l2PhotonHypo) acc.merge(l2PhotonReco) - l2PhotonHypo = RecoFragmentsPool.retrieve(l2PhotonHypoCfg, - flags, - Photons='L2Photons', - RunInView=True) - l2PhotonSequence = MenuSequence(Sequence=l2PhotonReco.sequence(), - Maker=l2PhotonReco.inputMaker(), - Hypo=l2PhotonHypo, - HypoToolGen=TrigL2PhotonHypoToolFromName) + l2PhotonSequence = MenuSequence( Sequence = l2PhotonReco.sequence(), + Maker = l2PhotonReco.inputMaker(), + Hypo = l2PhotonHypo, + HypoToolGen = None ) l2PhotonStep = ChainStep(getChainStepName('Photon', 2), [l2PhotonSequence])