diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx index 8d0b969c0ea1685dde311e342e07d2943d0ede4f..2756f215e00d86f5cbe5b57aeeaf96a01e4b72cd 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx +++ b/Trigger/TrigHypothesis/TrigMuonHypo/src/TrigMuonEFCombinerHypoTool.cxx @@ -106,7 +106,7 @@ StatusCode TrigMuonEFCombinerHypoTool::decide(std::vector<MuonEFInfo>& toolInput return inclusiveSelection(toolInput); } else{ - if(numMuon ==1) ATH_MSG_DEBUG("Not applying selection "<<m_decisionId<< " because the number of muons is "<<numMuon); + if(numMuon <=1) ATH_MSG_DEBUG("Not applying selection "<<m_decisionId<< " because the number of muons is "<<numMuon); else{ ATH_MSG_DEBUG("Applying selection of multiplicity "<< m_decisionId); return multiplicitySelection(toolInput); diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py index b9ffce16245657d8b8ae3db06839a5cffe6f885c..f6b784768f307292f73358e0fc0c5fc93d624668 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/MuonSetup.py @@ -516,7 +516,7 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): MuonTrackSteering.DoSummary=True MuonTrackSteering.DoSummary=DEBUG TrackBuilder = CfgMgr.MuPatTrackBuilder("MuPatTrackBuilder" ) - TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("MuonTrackSteering", "MuonTrackSteering") + TrackBuilder.TrackSteering=CfgGetter.getPublicToolClone("TrigMuonTrackSteering", "MuonTrackSteering") from AthenaCommon.Include import include include("InDetBeamSpotService/BeamCondSvc.py" ) @@ -567,3 +567,92 @@ def muEFSARecoSequence( RoIs, OutputLevel=INFO ): return muEFSARecoSequence, sequenceOut + + +def muEFCBRecoSequence( RoIs, OutputLevel=INFO ): + + from MuonRecExample.MuonRecFlags import muonRecFlags + from AthenaCommon.DetFlags import DetFlags + from AthenaCommon.AppMgr import ToolSvc + from AthenaCommon.AppMgr import ServiceMgr + import AthenaCommon.CfgMgr as CfgMgr + import AthenaCommon.CfgGetter as CfgGetter + + from AthenaCommon.CfgGetter import getPublicTool, getPublicToolClone + from AthenaCommon import CfgMgr + from AthenaCommon.CFElements import parOR, seqAND, seqOR, stepSeq + + efAlgs = [] + muEFCBRecoSequence = parOR("efcbViewNode") + #Need ID tracking related objects and MS tracks from previous steps + ViewVerifyTrk = CfgMgr.AthViews__ViewDataVerifier("muonCBViewDataVerifier") + ViewVerifyTrk.DataObjects = [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData' ), ( 'InDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ), ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),( 'xAOD::IParticleContainer' , 'StoreGateSvc+xAODTracks' ),( 'SCT_ByteStreamFractionContainer' , 'StoreGateSvc+SCT_ByteStreamFrac' ),( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ), ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ), ( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+MuonSpectrometerTrackParticles' ) ] + muEFCBRecoSequence += ViewVerifyTrk + + #Make InDetCandidates + theIndetCandidateAlg = CfgMgr.MuonCombinedInDetCandidateAlg("TrigMuonCombinedInDetCandidateAlg",TrackSelector=getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool"),TrackParticleLocation = ["xAODTracks"],ForwardParticleLocation="xAODTracks",OutputLevel=DEBUG) + + #MuonCombinedCandidates + theCaloMeasTool = getPublicToolClone("TrigCaloMeasTool", "MuidCaloEnergyMeas", CaloNoiseTool="", UseCaloNoiseTool=False,CellContainerLocation="") + theCaloEnergyTool = getPublicToolClone("TrigCaloEnergyTool", "MuidCaloEnergyTool", CaloMeasTool = theCaloMeasTool, EnergyLossMeasurement=False, MopParametrization=True, TrackIsolation=False) + + from TrkExRungeKuttaIntersector.TrkExRungeKuttaIntersectorConf import Trk__IntersectorWrapper as Propagator + TrigMuonPropagator = Propagator(name = 'TrigMuonPropagator') + ToolSvc += TrigMuonPropagator + + theCaloTSOS = getPublicToolClone("TrigCaloTrackStateOnSurface", "MuidCaloTrackStateOnSurface", CaloEnergyDeposit=theCaloEnergyTool, CaloEnergyParam=theCaloEnergyTool, Propagator =TrigMuonPropagator, MinRemainingEnergy= 200, ParamPtCut= 3000) + from MuidCaloScatteringTools.MuidCaloScatteringToolsConf import Rec__MuidMaterialEffectsOnTrackProvider + Rec__MuidMaterialEffectsOnTrackProvider.TSOSTool=theCaloTSOS + + theErrorOptimiser = getPublicToolClone("TrigMuonErrorOptimiser", "MuonErrorOptimisationTool", PrepareForFit=False, RecreateStartingParameters=False,RefitTool=getPublicToolClone("TrigMuidRefitTool", "MuonRefitTool", AlignmentErrors = False, Fitter = CfgGetter.getPublicTool("iPatFitter"))) + + theTrackCleaner = getPublicToolClone("TrigMuonTrackCleaner", "MuonTrackCleaner", Fitter='TMEF_iPatFitter', SLFitter='TMEF_iPatFitter') + + + theTrackBuilderTool = getPublicToolClone("TrigCombinedMuonTrackBuilder","CombinedMuonTrackBuilder", UseCaloTG = True, CaloTSOS=theCaloTSOS, CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonHoleRecovery="",OutputLevel=DEBUG,CaloEnergyParam=theCaloEnergyTool,MuonErrorOptimizer=theErrorOptimiser, Fitter='TMEF_iPatFitter', MaterialAllocator="TMEF_MaterialAllocator", Propagator=TrigMuonPropagator, LargeMomentumError=0.5, PerigeeAtSpectrometerEntrance=True, ReallocateMaterial=False, TrackSummaryTool=getPublicTool("CombinedMuonTrackSummary"), Cleaner=theTrackCleaner) + theTrackQuery = getPublicToolClone("TrigMuonTrackQuery", "MuonTrackQuery", Fitter=theTrackBuilderTool) + + theCandidateToolCB = getPublicToolClone("TrigMuonCandidateTool_CB", "MuonCandidateTool", TrackBuilder=theTrackBuilderTool,OutputLevel=DEBUG) + theMuonCombinedCandidateAlg = CfgMgr.MuonCombinedMuonCandidateAlg("TrigMuonCombinedMuonCandidateAlg",MuonCandidateTool=theCandidateToolCB,MuonCandidateLocation="CombinedMuonCandidates", OutputLevel=DEBUG) + + #MS ID combination + theMuonCombinedFitTagTool = getPublicToolClone("TrigMuonCombinedFitTagTool", "MuonCombinedFitTagTool",TrackBuilder=theTrackBuilderTool,MuonRecovery=getPublicToolClone("TrigMuonRecovery","MuidMuonRecovery", TrackBuilder=theTrackBuilderTool),OutputLevel=DEBUG, TrackQuery=theTrackQuery, MatchQuality = getPublicToolClone("TrigMuonMatchQuality", "MuonMatchQuality", TrackQuery=theTrackQuery)) + tools=[] + tools.append(theMuonCombinedFitTagTool) + theMuonCombinedTool = getPublicToolClone("TrigMuonCombinedToolCB", "MuonCombinedTool", MuonCombinedTagTools=tools, OutputLevel=DEBUG) + theMuonCombinedAlg = CfgMgr.MuonCombinedAlg("TrigMuonCombinedAlg", MuonCandidateLocation="CombinedMuonCandidates", MuonCombinedTool=theMuonCombinedTool, CombinedTagMaps=["muidcoTagMap"], OutputLevel=DEBUG) + + #Build muon candidates + theCandidateToolCB = getPublicToolClone("MuonCandidateTool_CB", "MuonCandidateTool", TrackBuilder=theTrackBuilderTool) + theMuonCandidateAlgCB=CfgMgr.MuonCombinedMuonCandidateAlg("MuonCandidateAlgCB",MuonCandidateTool=theCandidateToolCB,MuonCandidateLocation="MuonCandidates") + + #Create xAOD Muons + thecreatortoolCB= getPublicToolClone("MuonCreatorTool_triggerCB", "MuonCreatorTool", ScatteringAngleTool="", CaloMaterialProvider='TMEF_TrkMaterialProviderTool', MuonSelectionTool="", FillTimingInformation=False, OutputLevel=DEBUG, DoCaloNoiseCut=False, UseCaloCells=False) + + themuoncbcreatoralg = CfgMgr.MuonCreatorAlg("MuonCreatorAlgCB", OutputLevel=DEBUG, MuonCandidateLocation="CombinedMuonCandidates") + themuoncbcreatoralg.MuonCreatorTool=thecreatortoolCB + themuoncbcreatoralg.MakeClusters=False + themuoncbcreatoralg.ClusterContainerName="" + themuoncbcreatoralg.MuonContainerLocation = "CBMuons" + themuoncbcreatoralg.SegmentContainerName = "CBSegments" + themuoncbcreatoralg.ExtrapolatedLocation = "CBExtrapolatedMuons" + themuoncbcreatoralg.MSOnlyExtrapolatedLocation = "CBMSOnlyExtrapolatedMuons" + themuoncbcreatoralg.CombinedLocation = "CBCombinedMuon" + + #Add all algorithms + efAlgs.append(theIndetCandidateAlg) + efAlgs.append(theMuonCombinedCandidateAlg) + efAlgs.append(theMuonCombinedAlg) + efAlgs.append(theMuonCandidateAlgCB) + efAlgs.append(themuoncbcreatoralg) + + + # setup muEFMsonly algs + for efAlg in efAlgs: + muEFCBRecoSequence += efAlg + sequenceOut = themuoncbcreatoralg.MuonContainerLocation + + + return muEFCBRecoSequence, sequenceOut + + diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py index 2621d948d4efe564c9806422393a60963f3fb395..3dfb35e68386caa324747ff8c3fd3d8d38210c69 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/muMenuDefs.py @@ -166,7 +166,6 @@ def muEFSAStep(): efsaViewsMaker = EventViewCreatorAlgorithm("efsaViewsMaker", OutputLevel=DEBUG) efsaViewsMaker.ViewFallThrough = True - #efsaViewsMaker.RoIsLink = "initialRoI" # -||- efsaViewsMaker.RoIsLink = "roi" # -||- efsaViewsMaker.InViewRoIs = "MUEFSARoIs" # contract with the consumer efsaViewsMaker.Views = "MUEFSAViewRoIs" @@ -192,6 +191,39 @@ def muEFSAStep(): Hypo = trigMuonEFSAHypo, HypoToolGen = TrigMuonEFMSonlyHypoToolFromName ) +def muEFCBStep(): + + efcbViewNode = parOR("efcbViewNode") + + efcbViewsMaker = EventViewCreatorAlgorithm("efcbViewsMaker", OutputLevel=DEBUG) + efcbViewsMaker.ViewFallThrough = True + efcbViewsMaker.RoIsLink = "roi" # -||- + efcbViewsMaker.InViewRoIs = "MUEFCBRoIs" # contract with the consumer + efcbViewsMaker.Views = "MUEFCBViewRoIs" + efcbViewsMaker.ViewNodeName = efcbViewNode.name() + + + ### get EF reco sequence ### + from TrigUpgradeTest.MuonSetup import muEFCBRecoSequence + muEFCBRecoSequence, sequenceOut = muEFCBRecoSequence( efcbViewsMaker.InViewRoIs, OutputLevel=DEBUG ) + + efcbViewsMaker.ViewNodeName = muEFCBRecoSequence.name() + + + # setup EFCB hypo + from TrigMuonHypo.TrigMuonHypoConfigMT import TrigMuonEFCombinerHypoConfig + trigMuonEFCBHypo = TrigMuonEFCombinerHypoConfig( "TrigMuonEFCombinerHypoAlg" ) + trigMuonEFCBHypo.OutputLevel = DEBUG + trigMuonEFCBHypo.MuonDecisions = sequenceOut + + muonEFCBSequence = seqAND( "muonEFCBSequence", [efcbViewsMaker, efcbViewNode] ) + + + return MenuSequence( Sequence = muonEFCBSequence, + Maker = efcbViewsMaker, + Hypo = trigMuonEFCBHypo, + HypoToolGen = trigMuonEFCBHypo.TrigMuonEFCombinerHypoToolFromName ) + ### l2Muiso step ### def muIsoStep(): diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py index 5885ffb5ce3061e8781fcc275fbeb92abe448dfd..9b56b4642da7c9c6c34bacd1ebb8561a19b94e96 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mu.menu.py @@ -39,7 +39,8 @@ if TriggerFlags.doMuon==True: ########################################## from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep - from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muEFMSStep, muEFSAStep, muIsoStep + from TrigUpgradeTest.muMenuDefs import muFastStep, muCombStep, muEFMSStep, muEFSAStep, muIsoStep, muEFCBStep + MenuChains = [] @@ -51,17 +52,19 @@ if TriggerFlags.doMuon==True: # step3 step3muEFSA=ChainStep("Step3_muEFSA", [ muEFSAStep() ]) step3muIso =ChainStep("Step3_muIso", [ muIsoStep() ]) + # step4 + step4muEFCB=ChainStep("Step4_muEFCB", [ muEFCBStep() ]) ## single muon trigger MenuChains += [Chain(name='HLT_mu6fast', Seed="L1_MU6", ChainSteps=[ step1mufast ])] MenuChains += [Chain(name='HLT_mu6Comb', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb ])] #MenuChains += [Chain(name='HLT_mu6msonly', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muEFMS ])] # removed due to muEFSA isuue(?) - MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muEFSA ])] + MenuChains += [Chain(name='HLT_mu6', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muEFSA, step4muEFCB ])] MenuChains += [Chain(name='HLT_mu20_ivar', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muIso ])] # multi muon trigger MenuChains += [Chain(name='HLT_2mu6Comb', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb ])] - MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muEFSA ])] + MenuChains += [Chain(name='HLT_2mu6', Seed="L1_MU6", ChainSteps=[ step1mufast, step2muComb, step3muEFSA, step4muEFCB ])] #################################