diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py index e44ecc166ab75de14ede4b3cc68a912c87a045b1..66c8c4b4719a35ef89a05be7690f88fbeae3f6cf 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py @@ -27,15 +27,9 @@ InDetFlags.init() # PixelLorentzAngleSvc and SCTLorentzAngleSvc include("InDetRecExample/InDetRecConditionsAccess.py") -viewTest = opt.enableViews # from testHLT_MT.py from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -AthViewSeq = None -if viewTest: - allViewAlgorithms = topSequence.AthViewSeq.allViewAlgorithms - AthViewSeq = topSequence.AthViewSeq - print( dir( AthViewSeq.viewMaker ) ) - AthViewSeq.viewMaker.Enable = False + from InDetRecExample.InDetKeys import InDetKeys @@ -57,52 +51,65 @@ from AthenaCommon.CFElements import parOR, seqOR, seqAND, stepSeq from DecisionHandling.DecisionHandlingConf import RoRSeqFilter, DumpDecisions from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm -if viewTest: - filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") - filterL1RoIsAlg.Input = ["EMRoIDecisions"] - filterL1RoIsAlg.Output = ["FilteredEMRoIDecisions"] - filterL1RoIsAlg.Chains = testChains - filterL1RoIsAlg.OutputLevel = DEBUG - - allViewAlgorithms += theFastCaloAlgo - svcMgr.ViewAlgPool.TopAlg += [ theFastCaloAlgo.getName() ] - l2CaloViewsMaker = EventViewCreatorAlgorithm("l2CaloViewsMaker", OutputLevel=DEBUG) - l2CaloViewsMaker.ViewFallThrough = True - l2CaloViewsMaker.Decisions = "FilteredEMRoIDecisions" # from EMRoIsUnpackingTool - l2CaloViewsMaker.RoIsLink = "initialRoI" # -||- - l2CaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo - l2CaloViewsMaker.Views = "EMCaloViews" - l2CaloViewsMaker.AlgorithmNameSequence = [ theFastCaloAlgo.getName() ] - theFastCaloAlgo.RoIs = l2CaloViewsMaker.InViewRoIs - - - from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlg - from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName - theFastCaloHypo = TrigL2CaloHypoAlg("L2CaloHypo") - theFastCaloHypo.OutputLevel = DEBUG - theFastCaloHypo.L1Decisions = "EMRoIDecisions" - theFastCaloHypo.Views = l2CaloViewsMaker.Views - theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName - theFastCaloHypo.RoIs = l2CaloViewsMaker.InViewRoIs - theFastCaloHypo.Decisions = "EgammaCaloDecisions" - theFastCaloHypo.HypoTools = [ TrigL2CaloHypoToolFromName( c ) for c in testChains ] -#[ TrigL2CaloHypoToolFromName("HLT_e5_etcut"), TrigL2CaloHypoToolFromName("HLT_e7_etcut") , TrigL2CaloHypoToolFromName("HLT_2e3_etcut"), TrigL2CaloHypoToolFromName("HLT_e3e5_etcut") ] - for t in theFastCaloHypo.HypoTools: - t.OutputLevel = DEBUG +fastCaloInViewAlgs = seqAND("fastCaloInViewAlgs", [ theFastCaloAlgo ]) - # topSequence += theFastCaloHypo - caloDecisionsDumper = DumpDecisions("caloDecisionsDumper", OutputLevel=DEBUG, Decisions = theFastCaloHypo.Decisions ) +filterL1RoIsAlg = RoRSeqFilter("filterL1RoIsAlg") +filterL1RoIsAlg.Input = ["EMRoIDecisions"] +filterL1RoIsAlg.Output = ["FilteredEMRoIDecisions"] +filterL1RoIsAlg.Chains = testChains +filterL1RoIsAlg.OutputLevel = DEBUG - egammaCaloStep = stepSeq("egammaCaloStep", filterL1RoIsAlg, [ l2CaloViewsMaker, theFastCaloHypo, caloDecisionsDumper ]) -else: - topSequence += theFastCaloAlgo + -InDetCacheCreatorTrigViews = topSequence.AthViewSeq.InDetCacheCreatorTrigViews +fastCaloViewsMaker = EventViewCreatorAlgorithm("fastCaloViewsMaker", OutputLevel=DEBUG) +fastCaloViewsMaker.ViewFallThrough = True +fastCaloViewsMaker.Decisions = "FilteredEMRoIDecisions" # from EMRoIsUnpackingTool +fastCaloViewsMaker.RoIsLink = "initialRoI" # -||- +fastCaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo +fastCaloViewsMaker.Views = "EMCaloViews" +#fastCaloViewsMaker.AlgorithmNameSequence = [ theFastCaloAlgo.getName() ] +fastCaloViewsMaker.ViewNodeName = "fastCaloInViewAlgs" +theFastCaloAlgo.RoIs = fastCaloViewsMaker.InViewRoIs + + + +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlg +from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName +theFastCaloHypo = TrigL2CaloHypoAlg("L2CaloHypo") +theFastCaloHypo.OutputLevel = DEBUG +theFastCaloHypo.L1Decisions = "EMRoIDecisions" +theFastCaloHypo.Views = fastCaloViewsMaker.Views +theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName +theFastCaloHypo.RoIs = fastCaloViewsMaker.InViewRoIs +theFastCaloHypo.Decisions = "EgammaCaloDecisions" +theFastCaloHypo.HypoTools = [ TrigL2CaloHypoToolFromName( c ) for c in testChains ] +#[ TrigL2CaloHypoToolFromName("HLT_e5_etcut"), TrigL2CaloHypoToolFromName("HLT_e7_etcut") , TrigL2CaloHypoToolFromName("HLT_2e3_etcut"), TrigL2CaloHypoToolFromName("HLT_e3e5_etcut") ] + +for t in theFastCaloHypo.HypoTools: + t.OutputLevel = DEBUG + +# topSequence += theFastCaloHypo +caloDecisionsDumper = DumpDecisions("caloDecisionsDumper", OutputLevel=DEBUG, Decisions = theFastCaloHypo.Decisions ) + +fastCaloSequence = seqAND("fastCaloSequence", [fastCaloViewsMaker, fastCaloInViewAlgs, theFastCaloHypo ]) + +egammaCaloStep = stepSeq("egammaCaloStep", filterL1RoIsAlg, [ fastCaloSequence, caloDecisionsDumper ]) + + +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) #Pixel from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRodDecoder @@ -211,8 +218,8 @@ InDetPixelClusterization = InDet__PixelClusterization(name = ClustersName = "PixelTrigClusters", isRoI_Seeded = True) -if viewTest: - InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.Pixel_ClusterKey + +InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.Pixel_ClusterKey # # --- SCT_ClusteringTool (public) @@ -235,8 +242,8 @@ InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "I FlaggedConditionService = InDetSCT_FlaggedConditionSvc, isRoI_Seeded = True ) -if viewTest: - InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.SCT_ClusterKey + +InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheCreatorTrigViews.SCT_ClusterKey #Space points and FTF @@ -256,9 +263,9 @@ InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name ProcessSCTs = DetFlags.haveRIO.SCT_on(), ProcessOverlaps = DetFlags.haveRIO.SCT_on(), OutputLevel=DEBUG) -if viewTest: - InDetSiTrackerSpacePointFinder.SpacePointCacheSCT = InDetCacheCreatorTrigViews.SpacePointCacheSCT - InDetSiTrackerSpacePointFinder.SpacePointCachePix = InDetCacheCreatorTrigViews.SpacePointCachePix + +InDetSiTrackerSpacePointFinder.SpacePointCacheSCT = InDetCacheCreatorTrigViews.SpacePointCacheSCT +InDetSiTrackerSpacePointFinder.SpacePointCachePix = InDetCacheCreatorTrigViews.SpacePointCachePix from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma theFTF = TrigFastTrackFinder_eGamma() @@ -274,7 +281,10 @@ theTrackParticleCreatorAlg = InDet__TrigTrackingxAODCnvMT(name = "InDetTrigTrack TrackParticlesName = "xAODTracks", ParticleCreatorTool = InDetTrigParticleCreatorToolFTF) -IDSequence = [ InDetPixelRawDataProvider, InDetSCTRawDataProvider, InDetTRTRawDataProvider, InDetPixelClusterization, InDetSCT_Clusterization, InDetSiTrackerSpacePointFinder, theFTF, theTrackParticleCreatorAlg ] +IDSequence = [ InDetPixelRawDataProvider, InDetSCTRawDataProvider, InDetTRTRawDataProvider, InDetPixelClusterization, InDetSCT_Clusterization, InDetSiTrackerSpacePointFinder, theFTF, theTrackParticleCreatorAlg ] + + + from TrigEgammaHypo.TrigL2ElectronFexMTConfig import L2ElectronFex_1 @@ -285,57 +295,51 @@ theElectronFex.ElectronsName="Electrons" theElectronFex.OutputLevel=VERBOSE -if viewTest: - filterCaloRoIsAlg = RoRSeqFilter("filterCaloRoIsAlg") - filterCaloRoIsAlg.Input = [theFastCaloHypo.Decisions] - filterCaloRoIsAlg.Output = ["Filtered"+theFastCaloHypo.Decisions] - filterCaloRoIsAlg.Chains = testChains - filterCaloRoIsAlg.OutputLevel = DEBUG - - - l2ElectronViewsMaker = EventViewCreatorAlgorithm("l2ElectronViewsMaker", OutputLevel=DEBUG) - # topSequence += l2ElectronViewsMaker - l2ElectronViewsMaker.Decisions = filterCaloRoIsAlg.Output[0] # output of L2CaloHypo - l2ElectronViewsMaker.RoIsLink = "roi" # -||- - l2ElectronViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo - l2ElectronViewsMaker.Views = "EMElectronViews" - l2ElectronViewsMaker.ViewFallThrough = True - - theTrackParticleCreatorAlg.roiCollectionName = l2ElectronViewsMaker.InViewRoIs - for idAlg in IDSequence: - if idAlg.properties().has_key("RoIs"): - idAlg.RoIs = l2ElectronViewsMaker.InViewRoIs - - allViewAlgorithms += idAlg - svcMgr.ViewAlgPool.TopAlg += [ idAlg.getName() ] - l2ElectronViewsMaker.AlgorithmNameSequence += [ idAlg.getName() ] - - - theElectronFex.RoIs = l2ElectronViewsMaker.InViewRoIs - allViewAlgorithms += theElectronFex - svcMgr.ViewAlgPool.TopAlg += [ theElectronFex.getName() ] - l2ElectronViewsMaker.AlgorithmNameSequence += [ theElectronFex.getName() ] - - - from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlg - from TrigEgammaHypo.TrigL2ElectronHypoTool import TrigL2ElectronHypoToolFromName - theElectronHypo = TrigL2ElectronHypoAlg() - theElectronHypo.Views = l2ElectronViewsMaker.Views - theElectronHypo.Electrons = theElectronFex.ElectronsName - theElectronHypo.ClusterDecisions = theFastCaloHypo.Decisions - theElectronHypo.ElectronDecisions = "ElectronL2Decisions" - theElectronHypo.OutputLevel = VERBOSE - theElectronHypo.HypoTools = [ TrigL2ElectronHypoToolFromName( c ) for c in testChains ] - - for t in theElectronHypo.HypoTools: - t.OutputLevel = VERBOSE - # topSequence += theElectronHypo - electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", OutputLevel=DEBUG, Decisions = theElectronHypo.ElectronDecisions ) - egammaIDStep = stepSeq("egammaIDStep", filterCaloRoIsAlg, [ l2ElectronViewsMaker, theElectronHypo, electronDecisionsDumper ] ) - -else: - # ID algs can't run w/o views yet - pass + +filterCaloRoIsAlg = RoRSeqFilter("filterCaloRoIsAlg") +filterCaloRoIsAlg.Input = [theFastCaloHypo.Decisions] +filterCaloRoIsAlg.Output = ["Filtered"+theFastCaloHypo.Decisions] +filterCaloRoIsAlg.Chains = testChains +filterCaloRoIsAlg.OutputLevel = DEBUG + + +l2ElectronViewsMaker = EventViewCreatorAlgorithm("l2ElectronViewsMaker", OutputLevel=DEBUG) +# topSequence += l2ElectronViewsMaker +l2ElectronViewsMaker.Decisions = filterCaloRoIsAlg.Output[0] # output of L2CaloHypo +l2ElectronViewsMaker.RoIsLink = "roi" # -||- +l2ElectronViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo +l2ElectronViewsMaker.Views = "EMElectronViews" +l2ElectronViewsMaker.ViewFallThrough = True + +theTrackParticleCreatorAlg.roiCollectionName = l2ElectronViewsMaker.InViewRoIs +for idAlg in IDSequence: + if idAlg.properties().has_key("RoIs"): + idAlg.RoIs = l2ElectronViewsMaker.InViewRoIs +theElectronFex.RoIs = l2ElectronViewsMaker.InViewRoIs + +electronInViewAlgs = parOR("electronInViewAlgs", IDSequence + [ theElectronFex ]) + +l2ElectronViewsMaker.ViewNodeName = "electronInViewAlgs" + + +from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlg +from TrigEgammaHypo.TrigL2ElectronHypoTool import TrigL2ElectronHypoToolFromName +theElectronHypo = TrigL2ElectronHypoAlg() +theElectronHypo.Views = l2ElectronViewsMaker.Views +theElectronHypo.Electrons = theElectronFex.ElectronsName +theElectronHypo.ClusterDecisions = theFastCaloHypo.Decisions +theElectronHypo.ElectronDecisions = "ElectronL2Decisions" +theElectronHypo.OutputLevel = VERBOSE +theElectronHypo.HypoTools = [ TrigL2ElectronHypoToolFromName( c ) for c in testChains ] + +for t in theElectronHypo.HypoTools: + t.OutputLevel = VERBOSE +# topSequence += theElectronHypo +# InDetCacheCreatorTrigViews, +electronSequence = seqAND("electronSequence", [InDetCacheCreatorTrigViews, l2ElectronViewsMaker, electronInViewAlgs, theElectronHypo ] ) + +electronDecisionsDumper = DumpDecisions("electronDecisionsDumper", OutputLevel=DEBUG, Decisions = theElectronHypo.ElectronDecisions ) +egammaIDStep = stepSeq("egammaIDStep", filterCaloRoIsAlg, [ electronSequence, electronDecisionsDumper ] ) # CF construction diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py index da8ac7d3573c03dda26e0c842ac1f09a044b6146..6f77537518a59c85b4c3d3edaa35a020b62e44cf 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.withViews.py @@ -8,7 +8,6 @@ include("TrigUpgradeTest/testHLT_MT.py") from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -allViewAlgorithms = AthSequencer("allViewAlgorithms", Sequential=False, ModeOR=False, StopOverride=False) # provide a minimal menu information topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG @@ -85,7 +84,7 @@ if TriggerFlags.doMuon: filterL1RoIsAlg.OutputLevel = DEBUG # view creator - l2MuViewNode = AthSequencer("allViewAlgorithms", Sequential=False, ModeOR=False, StopOverride=False) + l2MuViewNode = AthSequencer("l2MuViewNode", Sequential=False, ModeOR=False, StopOverride=False) from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm l2MuViewsMaker = EventViewCreatorAlgorithm("l2MuViewsMaker", OutputLevel=DEBUG) l2MuViewsMaker.ViewFallThrough = True