Skip to content
Snippets Groups Projects
Commit 3cec2dec authored by bwynne's avatar bwynne
Browse files

Removed the option to enable views from testHLT - views are now enabled!

parent 7002cf9e
No related branches found
No related tags found
No related merge requests found
......@@ -4,27 +4,44 @@
include("TrigUpgradeTest/testHLT_MT.py")
viewTest = opt.enableViews # from testHLT_MT.py
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
AthViewSeq = topSequence.AthViewSeq
isData = False
if globalflags.InputFormat.is_bytestream():
isData = True
InDetCacheCreatorTrigViews = AthViewSeq.InDetCacheCreatorTrigViews
allViewAlgorithms = None
# ----------------------------------------------------------------
# Setup Views
# ----------------------------------------------------------------
viewSeq = AthSequencer("AthViewSeq", Sequential=True, ModeOR=False, StopOverride=False)
topSequence += viewSeq
if viewTest:
allViewAlgorithms = AthViewSeq.allViewAlgorithms
#Create IdentifiableCaches
from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator
InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews",
Pixel_ClusterKey = "PixelTrigClustersCache",
SCT_ClusterKey = "SCT_ClustersCache",
SpacePointCachePix = "PixelSpacePointCache",
SpacePointCacheSCT = "SctSpacePointCache",
SCTRDOCacheKey = "SctRDOCache",
PixRDOCacheKey = "PixRDOCache",
OutputLevel=DEBUG)
viewSeq += InDetCacheCreatorTrigViews
viewMaker = AthViewSeq.viewMaker
viewMaker.ViewBaseName = "testView"
viewMaker.InputRoICollection = "EMRoIs"
viewMaker.ViewNodeName = allViewAlgorithms.name()
viewMaker.OutputRoICollection = "EMViewRoIs"
viewMaker.ViewFallThrough = True
# View maker alg
viewNodeName = "allViewAlgorithms"
viewMaker = CfgMgr.AthViews__RoiCollectionToViews("viewMaker")
viewMaker.ViewBaseName = "testView"
viewMaker.InputRoICollection = "EMRoIs"
viewMaker.ViewNodeName = viewNodeName
viewMaker.OutputRoICollection = "EMViewRoIs"
viewMaker.ViewFallThrough = True
viewSeq += viewMaker
# Set of view algs
allViewAlgorithms = AthSequencer(viewNodeName, Sequential=False, ModeOR=False, StopOverride=False)
viewSeq += allViewAlgorithms
from InDetRecExample.InDetKeys import InDetKeys
......@@ -80,15 +97,10 @@ if TriggerFlags.doID:
ProviderTool = InDetPixelRawDataProviderTool,
OutputLevel = INFO)
if ( viewTest ):
allViewAlgorithms += InDetPixelRawDataProvider
allViewAlgorithms.InDetPixelRawDataProvider.isRoI_Seeded = True
allViewAlgorithms.InDetPixelRawDataProvider.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetPixelRawDataProvider.RDOCacheKey = InDetCacheCreatorTrigViews.PixRDOCacheKey
else:
topSequence += InDetPixelRawDataProvider
topSequence.InDetPixelRawDataProvider.isRoI_Seeded = True
topSequence.InDetPixelRawDataProvider.RoIs = "EMRoIs"
allViewAlgorithms += InDetPixelRawDataProvider
allViewAlgorithms.InDetPixelRawDataProvider.isRoI_Seeded = True
allViewAlgorithms.InDetPixelRawDataProvider.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetPixelRawDataProvider.RDOCacheKey = InDetCacheCreatorTrigViews.PixRDOCacheKey
if (InDetFlags.doPrintConfigurables()):
......@@ -115,15 +127,10 @@ if TriggerFlags.doID:
ProviderTool = InDetSCTRawDataProviderTool,
OutputLevel = INFO)
if ( viewTest ):
allViewAlgorithms += InDetSCTRawDataProvider
allViewAlgorithms.InDetSCTRawDataProvider.isRoI_Seeded = True
allViewAlgorithms.InDetSCTRawDataProvider.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetSCTRawDataProvider.RDOCacheKey = InDetCacheCreatorTrigViews.SCTRDOCacheKey
else:
topSequence += InDetSCTRawDataProvider
topSequence.InDetSCTRawDataProvider.isRoI_Seeded = True
topSequence.InDetSCTRawDataProvider.RoIs = "EMRoIs"
allViewAlgorithms += InDetSCTRawDataProvider
allViewAlgorithms.InDetSCTRawDataProvider.isRoI_Seeded = True
allViewAlgorithms.InDetSCTRawDataProvider.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetSCTRawDataProvider.RDOCacheKey = InDetCacheCreatorTrigViews.SCTRDOCacheKey
#TRT
......@@ -152,14 +159,9 @@ if TriggerFlags.doID:
RDOKey = "TRT_RDOs",
ProviderTool = InDetTRTRawDataProviderTool)
if ( viewTest ):
allViewAlgorithms += InDetTRTRawDataProvider
allViewAlgorithms.InDetTRTRawDataProvider.isRoI_Seeded = True
allViewAlgorithms.InDetTRTRawDataProvider.RoIs = "EMViewRoIs"
else:
topSequence += InDetTRTRawDataProvider
topSequence.InDetTRTRawDataProvider.isRoI_Seeded = True
topSequence.InDetTRTRawDataProvider.RoIs = "EMRoIs"
allViewAlgorithms += InDetTRTRawDataProvider
allViewAlgorithms.InDetTRTRawDataProvider.isRoI_Seeded = True
allViewAlgorithms.InDetTRTRawDataProvider.RoIs = "EMViewRoIs"
#Pixel clusterisation
......@@ -194,15 +196,10 @@ if TriggerFlags.doID:
DetectorManagerName = InDetKeys.PixelManager(),
DataObjectName = InDetKeys.PixelRDOs(),
ClustersName = "PixelTrigClusters", OutputLevel = INFO)
if ( viewTest ):
allViewAlgorithms += InDetPixelClusterization
allViewAlgorithms.InDetPixelClusterization.isRoI_Seeded = True
allViewAlgorithms.InDetPixelClusterization.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.Pixel_ClusterKey
else:
topSequence += InDetPixelClusterization
topSequence.InDetPixelClusterization.isRoI_Seeded = True
topSequence.InDetPixelClusterization.RoIs = "EMRoIs"
allViewAlgorithms += InDetPixelClusterization
allViewAlgorithms.InDetPixelClusterization.isRoI_Seeded = True
allViewAlgorithms.InDetPixelClusterization.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.Pixel_ClusterKey
......@@ -226,15 +223,10 @@ if TriggerFlags.doID:
conditionsService = InDetSCT_ConditionsSummarySvc,
FlaggedConditionService = InDetSCT_FlaggedConditionSvc, OutputLevel = INFO)
if ( viewTest ):
allViewAlgorithms += InDetSCT_Clusterization
allViewAlgorithms.InDetSCT_Clusterization.isRoI_Seeded = True
allViewAlgorithms.InDetSCT_Clusterization.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.SCT_ClusterKey
else:
topSequence += InDetSCT_Clusterization
topSequence.InDetSCT_Clusterization.isRoI_Seeded = True
topSequence.InDetSCT_Clusterization.RoIs = "EMRoIs"
allViewAlgorithms += InDetSCT_Clusterization
allViewAlgorithms.InDetSCT_Clusterization.isRoI_Seeded = True
allViewAlgorithms.InDetSCT_Clusterization.RoIs = "EMViewRoIs"
allViewAlgorithms.InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.SCT_ClusterKey
#Space points and FTF
......@@ -260,17 +252,12 @@ if TriggerFlags.doID:
from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma
theFTF = TrigFastTrackFinder_eGamma()
if ( viewTest ):
allViewAlgorithms += InDetSiTrackerSpacePointFinder
allViewAlgorithms += theFTF
allViewAlgorithms.TrigFastTrackFinder_eGamma.isRoI_Seeded = True
allViewAlgorithms.TrigFastTrackFinder_eGamma.RoIs = "EMViewRoIs"
InDetSiTrackerSpacePointFinder.SpacePointCacheSCT = InDetCacheCreatorTrigViews.SpacePointCacheSCT
InDetSiTrackerSpacePointFinder.SpacePointCachePix = InDetCacheCreatorTrigViews.SpacePointCachePix
else:
topSequence += InDetSiTrackerSpacePointFinder
theFTF.RoIs = "EMRoIs"
topSequence += theFTF
allViewAlgorithms += InDetSiTrackerSpacePointFinder
allViewAlgorithms += theFTF
allViewAlgorithms.TrigFastTrackFinder_eGamma.isRoI_Seeded = True
allViewAlgorithms.TrigFastTrackFinder_eGamma.RoIs = "EMViewRoIs"
InDetSiTrackerSpacePointFinder.SpacePointCacheSCT = InDetCacheCreatorTrigViews.SpacePointCacheSCT
InDetSiTrackerSpacePointFinder.SpacePointCachePix = InDetCacheCreatorTrigViews.SpacePointCachePix
if TriggerFlags.doCalo:
svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False
......@@ -280,10 +267,6 @@ if TriggerFlags.doCalo:
algo.OutputLevel=VERBOSE
#TopHLTSeq += algo
if ( viewTest ):
algo.RoIs="EMViewRoIs"
allViewAlgorithms += algo
else:
algo.RoIs="EMRoIs"
topSequence += algo
algo.RoIs="EMViewRoIs"
allViewAlgorithms += algo
......@@ -6,11 +6,9 @@
include("TrigUpgradeTest/testHLT_MT.py")
viewTest = opt.enableViews # from testHLT_MT.py
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
if viewTest:
allViewAlgorithms = topSequence.allViewAlgorithms
allViewAlgorithms = AthSequencer("allViewAlgorithms", Sequential=False, ModeOR=False, StopOverride=False)
# provide a minimal menu information
topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG
......@@ -86,81 +84,62 @@ if TriggerFlags.doMuon:
filterL1RoIsAlg.Chains = testChains
filterL1RoIsAlg.OutputLevel = DEBUG
# set up MuFastSteering
# view creator
l2MuViewNode = AthSequencer("allViewAlgorithms", Sequential=False, ModeOR=False, StopOverride=False)
from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig
muFastAlg = TrigL2MuonSAConfig("Muon")
muFastAlg.OutputLevel = DEBUG
l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG)
l2MuViewsMaker.ViewFallThrough = True
l2MuViewsMaker.Decisions = "MURoIDecisions"
l2MuViewsMaker.RoIsLink = "initialRoI" # -||-
l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer
l2MuViewsMaker.Views = "MUViewRoIs"
l2MuViewsMaker.ViewNodeName = l2MuViewNode.name()
svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection = False
if viewTest:
allViewAlgorithms += muFastAlg
svcMgr.ViewAlgPool.TopAlg += [ muFastAlg.getName() ]
l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG)
l2MuViewsMaker.ViewFallThrough = True
l2MuViewsMaker.Decisions = "MURoIDecisions"
l2MuViewsMaker.RoIsLink = "initialRoI" # -||-
l2MuViewsMaker.InViewRoIs = "MURoIs" # contract with the consumer
l2MuViewsMaker.Views = "MUViewRoIs"
l2MuViewsMaker.AlgorithmNameSequence = [ muFastAlg.getName() ]
muFastAlg.MuRoIs = l2MuViewsMaker.InViewRoIs
muFastAlg.RecMuonRoI = "RecMURoIs"
muFastAlg.MuFastDecisions = "MuFastAlg_Decisions"
muFastAlg.MuFastComposite = "MuFastAlg_Composite"
muFastAlg.MuFastForID = "MuFastAlg_IdDecisions"
muFastAlg.MuFastForMS = "MuFastAlg_MsDecisions"
else:
muFastAlg.MuRoIs = "MURoIs"
muFastAlg.RecMuonRoI = "RecMURoIs"
muFastAlg.MuFastDecisions = "MuFastAlg_Decisions"
muFastAlg.MuFastComposite = "MuFastAlg_Composite"
muFastAlg.MuFastForID = "MuFastAlg_IdDecisions"
muFastAlg.MuFastForMS = "MuFastAlg_MsDecisions"
# set up MuFastSteering
from TrigL2MuonSA.TrigL2MuonSAConfig import TrigL2MuonSAConfig
muFastAlg = TrigL2MuonSAConfig("Muon")
muFastAlg.OutputLevel = DEBUG
muFastAlg.MuRoIs = l2MuViewsMaker.InViewRoIs
muFastAlg.RecMuonRoI = "RecMURoIs"
muFastAlg.MuFastDecisions = "MuFastAlg_Decisions"
muFastAlg.MuFastComposite = "MuFastAlg_Composite"
muFastAlg.MuFastForID = "MuFastAlg_IdDecisions"
muFastAlg.MuFastForMS = "MuFastAlg_MsDecisions"
l2MuViewNode += muFastAlg
# set up MuFastHypo
if viewTest:
from TrigMuonHypo.TrigMuonHypoConfig import TrigMufastHypoConfig
trigMufastHypo = TrigMufastHypoConfig("L2MufastHypoAlg")
trigMufastHypo.OutputLevel = DEBUG
trigMufastHypo.ViewRoIs = l2MuViewsMaker.Views
trigMufastHypo.MuFastDecisions = muFastAlg.MuFastDecisions
trigMufastHypo.RoIs = l2MuViewsMaker.InViewRoIs
trigMufastHypo.Decisions = "L2MuonFastDecisions"
trigMufastHypo.L1Decisions = l2MuViewsMaker.Decisions
trigMufastHypo.HypoTools = [ trigMufastHypo.TrigMufastHypoToolFromName( "L2MufastHypoTool", c ) for c in testChains ]
from TrigMuonHypo.TrigMuonHypoConfig import TrigMufastHypoConfig
trigMufastHypo = TrigMufastHypoConfig("L2MufastHypoAlg")
trigMufastHypo.OutputLevel = DEBUG
trigMufastHypo.ViewRoIs = l2MuViewsMaker.Views
trigMufastHypo.MuFastDecisions = muFastAlg.MuFastDecisions
trigMufastHypo.RoIs = l2MuViewsMaker.InViewRoIs
trigMufastHypo.Decisions = "L2MuonFastDecisions"
trigMufastHypo.L1Decisions = l2MuViewsMaker.Decisions
muFastDecisionsDumper = DumpDecisions("muFastDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMufastHypo.Decisions )
muFastStep = stepSeq("muFastStep", filterL1RoIsAlg, [ l2MuViewsMaker, trigMufastHypo, muFastDecisionsDumper])
trigMufastHypo.HypoTools = [ trigMufastHypo.TrigMufastHypoToolFromName( "L2MufastHypoTool", c ) for c in testChains ]
else:
pass
muFastDecisionsDumper = DumpDecisions("muFastDecisionsDumper", OutputLevel=DEBUG, Decisions = trigMufastHypo.Decisions )
muFastStep = seqAND("muFastStep", [filterL1RoIsAlg, l2MuViewsMaker, l2MuViewNode, trigMufastHypo, muFastDecisionsDumper])
# CF construction
if viewTest:
step0 = parOR("step0", [ muFastStep ] )
from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg
summary = TriggerSummaryAlg( "TriggerSummaryAlg" )
summary.L1Decision = "HLTChains"
summary.FinalDecisions = ["L2MuonFastDecisions"]
summary.OutputLevel = DEBUG
HLTsteps = seqAND("HLTsteps", [ step0, summary ] )
mon = TriggerSummaryAlg( "TriggerMonitoringAlg" )
mon.L1Decision = "HLTChains"
mon.FinalDecisions = [ "L2MuonFastDecisions", "WhateverElse" ]
mon.HLTSummary = "MonitoringSummary"
mon.OutputLevel = DEBUG
hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
topSequence += hltTop
else:
topSequence += muFastAlg
step0 = parOR("step0", [ muFastStep ] )
from DecisionHandling.DecisionHandlingConf import TriggerSummaryAlg
summary = TriggerSummaryAlg( "TriggerSummaryAlg" )
summary.L1Decision = "HLTChains"
summary.FinalDecisions = ["L2MuonFastDecisions"]
summary.OutputLevel = DEBUG
HLTsteps = seqAND("HLTsteps", [ step0, summary ] )
mon = TriggerSummaryAlg( "TriggerMonitoringAlg" )
mon.L1Decision = "HLTChains"
mon.FinalDecisions = [ "L2MuonFastDecisions", "WhateverElse" ]
mon.HLTSummary = "MonitoringSummary"
mon.OutputLevel = DEBUG
hltTop = seqOR( "hltTop", [ HLTsteps, mon] )
topSequence += hltTop
......@@ -28,7 +28,6 @@ class opt :
doID = True # TriggerFlags.doID
doCalo = True # TriggerFlags.doCalo
doMuon = True # TriggerFlags.doMuon
enableViews = True # setup infrastructre for Views
doDBConfig = None # dump trigger configuration
trigBase = None # file name for trigger config dump
enableCostD3PD = False # enable cost monitoring
......@@ -232,7 +231,7 @@ for mod in modifierList:
from IOVSvc.IOVSvcConf import CondSvc
svcMgr += CondSvc()
from AthenaCommon.AlgSequence import AthSequencer
from AthenaCommon.AlgSequence import AthSequencer
condSeq = AthSequencer("AthCondSeq")
from IOVSvc.IOVSvcConf import CondInputLoader
......@@ -336,47 +335,6 @@ else:
from TrigUpgradeTest.TestUtils import L1EmulationTest
topSequence += L1EmulationTest(OutputLevel = opt.HLTOutputLevel)
# ----------------------------------------------------------------
# Setup Views
# ----------------------------------------------------------------
viewSeq = AthSequencer("AthViewSeq", Sequential=True, ModeOR=False, StopOverride=False)
topSequence += viewSeq
if opt.enableViews:
log.info('Setting up Views...')
# Make a separate alg pool for the view algs
from GaudiHive.GaudiHiveConf import AlgResourcePool #BEN
svcMgr += AlgResourcePool('ViewAlgPool') #BEN
#Create IdentifiableCaches
from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator
InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews",
Pixel_ClusterKey = "PixelTrigClustersCache",
SCT_ClusterKey = "SCT_ClustersCache",
SpacePointCachePix = "PixelSpacePointCache",
SpacePointCacheSCT = "SctSpacePointCache",
SCTRDOCacheKey = "SctRDOCache",
PixRDOCacheKey = "PixRDOCache",
OutputLevel=DEBUG)
viewSeq += InDetCacheCreatorTrigViews
# View maker alg
viewSeq += CfgMgr.AthViews__RoiCollectionToViews("viewMaker")
# Set of view algs
viewSeq += AthSequencer("allViewAlgorithms", Sequential=False, ModeOR=False, StopOverride=False)
# dummy alg that just says you're running in a view
# viewSeq.allViewAlgorithms += CfgMgr.AthViews__ViewTestAlg( "viewTest" )
else:
#This is to workaround the problem CondHandle bug, this can be removed once a proper solution is made
from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__CacheCreator
InDetCacheCreatorTrigViews = InDet__CacheCreator(name = "InDetCacheCreatorTrigViews",
Pixel_ClusterKey = "",
SCT_ClusterKey = "",
SpacePointCachePix = "",
SpacePointCacheSCT = "",
OutputLevel=INFO)
viewSeq += InDetCacheCreatorTrigViews
# ---------------------------------------------------------------
# Monitoring
# ---------------------------------------------------------------
......
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