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

Merge branch 'SeperatingUncMenu' into 'master'

ATR-19305: Cleaning  unconventional track trigger menu code

See merge request atlas/athena!42088
parents abc9f165 4565a109
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaCommon.CFElements import seqAND
from ..CommonSequences.FullScanDefs import caloFSRoI
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.IsoHighPtTrackTriggerConfiguration")
def FTFTrackSequence(ConfigFlags):
from TriggerMenuMT.HLTMenuConfig.Jet.JetMenuSequences import getTrackingInputMaker
InputMakerAlg=getTrackingInputMaker()
from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
IDTrigConfig = getInDetTrigConfig( 'jet' )
from TrigEDMConfig.TriggerEDMRun3 import recordable
from TrigInDetConfig.InDetSetup import makeInDetAlgsNoView
TrkInputNoViewAlg = makeInDetAlgsNoView( config = IDTrigConfig, rois=caloFSRoI)
from TrigInDetConfig.TrigInDetPriVtxConfig import makeVertices
verticesname = recordable("HLT_IDVertex_FS")
vtxAlgs = makeVertices( "jet", IDTrigConfig.FT.tracksFTF( doRecord = IDTrigConfig.isRecordable ) , verticesname, IDTrigConfig )
prmVtx = vtxAlgs[-1]
TrkSeq = [InputMakerAlg,TrkInputNoViewAlg, prmVtx]
sequenceOut = IDTrigConfig.FT.tracksFTF( doRecord = IDTrigConfig.isRecordable )
return (TrkSeq, InputMakerAlg, sequenceOut)
def IsoHPtTrackTriggerHypoSequence():
from TrigLongLivedParticlesHypo.TrigIsoHPtTrackTriggerHypoTool import TrigIsoHPtTrackTriggerHypoToolFromDict
from TrigLongLivedParticlesHypo.TrigLongLivedParticlesHypoConf import (TrigIsoHPtTrackTriggerHypoAlgMT)
# Get sequence name
from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
IDTrigConfig = getInDetTrigConfig( 'jet' )
sequenceOut = IDTrigConfig.FT.tracksFTF( doRecord = IDTrigConfig.isRecordable )
#Setup the hypothesis algorithm
theIsoHPtTrackTriggerHypo = TrigIsoHPtTrackTriggerHypoAlgMT("L2IsoHPtTrack")
theIsoHPtTrackTriggerHypo.trackKey = sequenceOut
from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable
from AthenaConfiguration.ComponentFactory import CompFactory
DummyInputMakerAlg = conf2toConfigurable(CompFactory.InputMakerForRoI( "IM_IsoHPtTrack_HypoOnlyStep" ))
DummyInputMakerAlg.RoITool = conf2toConfigurable(CompFactory.ViewCreatorInitialROITool())
log.debug("Building the Step dictinary for IsoHPt!")
return MenuSequence( Sequence = seqAND("UncTrkEmptySeq",[DummyInputMakerAlg]),
Maker = DummyInputMakerAlg,
Hypo = theIsoHPtTrackTriggerHypo,
HypoToolGen = TrigIsoHPtTrackTriggerHypoToolFromDict,
)
def FTFRecoOnlySequence():
from TrigStreamerHypo.TrigStreamerHypoConf import TrigStreamerHypoAlgMT
from TrigStreamerHypo.TrigStreamerHypoConfigMT import StreamerHypoToolMTgenerator
from AthenaConfiguration.AllConfigFlags import ConfigFlags
( TrkSeq, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(FTFTrackSequence,ConfigFlags)
HypoAlg = TrigStreamerHypoAlgMT("UncTrkDummyStream")
log.debug("Building the Step dictinary for IsoHPt!")
return MenuSequence( Sequence = seqAND("UncTrkrecoSeq", TrkSeq),
Maker = InputMakerAlg,
Hypo = HypoAlg,
HypoToolGen = StreamerHypoToolMTgenerator
)
......@@ -5,9 +5,7 @@ logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.UnconventionalTrackingChainConfiguration")
from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence, RecoFragmentsPool
from AthenaCommon.CFElements import seqAND
from ..CommonSequences.FullScanDefs import caloFSRoI
def unconventionalTrackingChainParts(chainParts):
......@@ -63,7 +61,7 @@ class UnconventionalTrackingChainConfiguration(ChainConfigurationBase):
# --------------------
stepDictionary = {
"isohpttrack" : [['getSkipStep'],['getFTFTrackReco'],['getIsoHPtTrackTrigger']],
"isohpttrack" : [['getIsoHPtTrackEmtpy'],['getFTFTrackReco'],['getIsoHPtTrackTrigger']],
"fslrt": [['getFSLRTEmpty'], ['getFSLRTTrigger']]
}
......@@ -77,7 +75,7 @@ class UnconventionalTrackingChainConfiguration(ChainConfigurationBase):
def getFTFTrackReco(self):
return self.getStep(6,'FTFRecoOnlyCfg',[FTFRecoOnlyCfg])
def getSkipStep(self):
def getIsoHPtTrackEmtpy(self):
return self.getEmptyStep(1,"EmptyUncTrk")
def getFSLRTTrigger(self):
......@@ -87,84 +85,13 @@ class UnconventionalTrackingChainConfiguration(ChainConfigurationBase):
return self.getEmptyStep(1, 'FSLRTEmptyStep')
def FTFTrackSequence(ConfigFlags):
from TriggerMenuMT.HLTMenuConfig.Jet.JetMenuSequences import getTrackingInputMaker
InputMakerAlg=getTrackingInputMaker()
from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
IDTrigConfig = getInDetTrigConfig( 'jet' )
from TrigEDMConfig.TriggerEDMRun3 import recordable
from TrigInDetConfig.InDetSetup import makeInDetAlgsNoView
TrkInputNoViewAlg = makeInDetAlgsNoView( config = IDTrigConfig, rois=caloFSRoI)
from TrigInDetConfig.TrigInDetPriVtxConfig import makeVertices
verticesname = recordable("HLT_IDVertex_FS")
vtxAlgs = makeVertices( "jet", IDTrigConfig.FT.tracksFTF( doRecord = IDTrigConfig.isRecordable ) , verticesname, IDTrigConfig )
prmVtx = vtxAlgs[-1]
TrkSeq = [InputMakerAlg,TrkInputNoViewAlg, prmVtx]
sequenceOut = IDTrigConfig.FT.tracksFTF( doRecord = IDTrigConfig.isRecordable )
return (TrkSeq, InputMakerAlg, sequenceOut)
def IsoHPtTrackTriggerHypoSequence():
from TrigLongLivedParticlesHypo.TrigIsoHPtTrackTriggerHypoTool import TrigIsoHPtTrackTriggerHypoToolFromDict
from TrigLongLivedParticlesHypo.TrigLongLivedParticlesHypoConf import (TrigIsoHPtTrackTriggerHypoAlgMT)
# Get sequence name
from TrigInDetConfig.ConfigSettings import getInDetTrigConfig
IDTrigConfig = getInDetTrigConfig( 'jet' )
sequenceOut = IDTrigConfig.FT.tracksFTF( doRecord = IDTrigConfig.isRecordable )
#Setup the hypothesis algorithm
theIsoHPtTrackTriggerHypo = TrigIsoHPtTrackTriggerHypoAlgMT("L2IsoHPtTrack")
theIsoHPtTrackTriggerHypo.trackKey = sequenceOut
from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable
from AthenaConfiguration.ComponentFactory import CompFactory
DummyInputMakerAlg = conf2toConfigurable(CompFactory.InputMakerForRoI( "IM_IsoHPtTrack_HypoOnlyStep" ))
DummyInputMakerAlg.RoITool = conf2toConfigurable(CompFactory.ViewCreatorInitialROITool())
log.debug("Building the Step dictinary for IsoHPt!")
return MenuSequence( Sequence = seqAND("UncTrkEmptySeq",[DummyInputMakerAlg]),
Maker = DummyInputMakerAlg,
Hypo = theIsoHPtTrackTriggerHypo,
HypoToolGen = TrigIsoHPtTrackTriggerHypoToolFromDict,
)
def FTFRecoOnlySequence():
from TrigStreamerHypo.TrigStreamerHypoConf import TrigStreamerHypoAlgMT
from TrigStreamerHypo.TrigStreamerHypoConfigMT import StreamerHypoToolMTgenerator
from AthenaConfiguration.AllConfigFlags import ConfigFlags
( TrkSeq, InputMakerAlg, sequenceOut) = RecoFragmentsPool.retrieve(FTFTrackSequence,ConfigFlags)
HypoAlg = TrigStreamerHypoAlgMT("UncTrkDummyStream")
log.debug("Building the Step dictinary for IsoHPt!")
return MenuSequence( Sequence = seqAND("UncTrkrecoSeq", TrkSeq),
Maker = InputMakerAlg,
Hypo = HypoAlg,
HypoToolGen = StreamerHypoToolMTgenerator
)
def IsoHPtTrackTriggerCfg(flags):
from TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.IsoHighPtTrackTriggerConfiguration import IsoHPtTrackTriggerHypoSequence
return IsoHPtTrackTriggerHypoSequence()
def FTFRecoOnlyCfg(flags):
from TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.IsoHighPtTrackTriggerConfiguration import FTFRecoOnlySequence
return FTFRecoOnlySequence()
def FSLRTTriggerCfg(flags):
......
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