From ac577d09f91eaa72a3e66b89dfdf9b975f25d3b3 Mon Sep 17 00:00:00 2001 From: Mark Sutton <mark.sutton@cern.ch> Date: Tue, 30 Jun 2020 08:58:41 +0000 Subject: [PATCH] Write out the FS trigger vertices in to the EDM The vertex collection produced in the fullscan jet tracking has been added to the EDM so that it can be written out --- Reconstruction/eflowRec/python/PFHLTSequence.py | 2 +- .../TrigBjetMonitoring/HLTBjetMonTool.h | 2 +- .../TrigBjetMonitoring/src/HLTBjetMonTool.cxx | 4 +++- .../src/TrigBjetMonitorAlgorithm.cxx | 8 ++++++-- .../TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h | 2 +- .../TrigEDMConfig/python/TriggerEDMRun3.py | 11 +++++++---- .../TriggerJobOpts/share/runHLT_standalone.py | 2 +- .../python/HLTMenuConfig/Bjet/BjetSequenceSetup.py | 2 +- .../python/HLTMenuConfig/Jet/JetRecoConfiguration.py | 4 ++-- .../python/HLTMenuConfig/Jet/JetTrackingConfig.py | 4 ++-- .../python/HLTMenuConfig/MET/AlgConfigs.py | 4 ++-- 11 files changed, 27 insertions(+), 18 deletions(-) diff --git a/Reconstruction/eflowRec/python/PFHLTSequence.py b/Reconstruction/eflowRec/python/PFHLTSequence.py index 1b59e4c86fa..a0a999012a0 100644 --- a/Reconstruction/eflowRec/python/PFHLTSequence.py +++ b/Reconstruction/eflowRec/python/PFHLTSequence.py @@ -9,7 +9,7 @@ log = logging.getLogger('PFHLTSequence') # Use the appropriate containers based on what config is desired trackvtxcontainers = { "offline": ("InDetTrackParticles","PrimaryVertices"), - "ftf": ("HLT_IDTrack_FS_FTF","HLT_EFHistoPrmVtx"), + "ftf": ("HLT_IDTrack_FS_FTF","HLT_IDVertex_FS"), } # PFTrackSelector diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/TrigBjetMonitoring/HLTBjetMonTool.h b/Trigger/TrigMonitoring/TrigBjetMonitoring/TrigBjetMonitoring/HLTBjetMonTool.h index 95e23681c80..323c2031ea7 100755 --- a/Trigger/TrigMonitoring/TrigBjetMonitoring/TrigBjetMonitoring/HLTBjetMonTool.h +++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/TrigBjetMonitoring/HLTBjetMonTool.h @@ -70,7 +70,7 @@ class HLTBjetMonTool : public IHLTMonTool { "The SG key of the online BJet container from the TriggerEDMRun3"}; SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"}; - SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_EFHistoPrmVtx","Key of online bjet primary vertexes"}; + SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"}; ToolHandle<Trig::TrigDecisionTool> m_trigDec; //! diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx index 69349b9b66d..05c6df13cca 100755 --- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx +++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx @@ -1083,7 +1083,9 @@ StatusCode HLTBjetMonTool::book(){ if(HistJet) hist2("jetEtaPhi"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(jet->eta(),jet->phi()); // zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted if (ijet == 0) { - auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, "EFHistoPrmVtx"); // CV 200120 + std::string vtxname = m_onlineVertexContainerKey.key(); + if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4); + auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120 const xAOD::Vertex* vtx = *(vertexLinkInfo.link); ATH_MSG_DEBUG(" PVz_jet from jet link info: " << vtx->z()); diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx index df2cc7e08ed..503e71ac1b3 100644 --- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx +++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx @@ -229,7 +229,7 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c }// onlinebjets }//bjetChain - + //bjet or mujet chains if (bjetChain || mujetChain) { @@ -369,7 +369,11 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c fill("TrigBjetMonitor",jetEta,jetPhi); // zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted if (ijet == 0) { - auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, "EFHistoPrmVtx"); // CV 200120 + + std::string vtxname = m_onlineVertexContainerKey.key(); + if ( vtxname.find("HLT_")==0 ) vtxname.erase(0,4); + + auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120 const xAOD::Vertex* vtx = *(vertexLinkInfo.link); NameH = "PVz_jet_"+trigName; diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h index 07dfd01f729..565bae13e0d 100644 --- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h +++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.h @@ -31,7 +31,7 @@ class TrigBjetMonitorAlgorithm : public AthMonitorAlgorithm { std::vector<std::string> m_allChains; SG::ReadHandleKey<xAOD::MuonContainer> m_muonContainerKey; SG::ReadHandleKey<xAOD::VertexContainer> m_offlineVertexContainerKey {this,"OfflineVertexContainerName","PrimaryVertices","Key of offline primary vertexes"}; - SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_EFHistoPrmVtx","Key of online bjet primary vertexes"}; + SG::ReadHandleKey<xAOD::VertexContainer> m_onlineVertexContainerKey {this,"OnlineVertexContainerName","HLT_IDVertex_FS","Key of online bjet primary vertexes"}; SG::ReadHandleKey<xAOD::TrackParticleContainer> m_onlineTrackContainerKey {this,"OnlineTrackContainerName","HLT_IDTrack_Bjet_IDTrig","Key of online tracks of bjets"}; ToolHandle<Trig::TrigDecisionTool> m_trigDec; //! diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py index 4c6d6d8264b..235f6af57ab 100644 --- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py +++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py @@ -287,10 +287,16 @@ TriggerHLTListRun3 = [ ('xAOD::JetContainer#HLT_AntiKt4EMPFlowCSSKJets_nojcalib_ftf', 'BS ESD AODFULL', 'Jet'), ('xAOD::JetAuxContainer#HLT_AntiKt4EMPFlowCSSKJets_nojcalib_ftfAux.'+JetVars, 'BS ESD AODFULL', 'Jet'), + # FS tracks ('xAOD::TrackParticleContainer#HLT_IDTrack_FS_FTF', 'BS ESD AODFULL', 'Jet'), ('xAOD::TrackParticleAuxContainer#HLT_IDTrack_FS_FTFAux.', 'BS ESD AODFULL', 'Jet'), - # custom BeamSpot tracks - we don't want to write these out in general so this + # FS vertices + ('xAOD::VertexContainer#HLT_IDVertex_FS', 'BS ESD AODFULL', 'Jet'), + ('xAOD::VertexAuxContainer#HLT_IDVertex_FSAux.', 'BS ESD AODFULL', 'Jet'), + + + # custom BeamSpot tracks - we don't want to write these out in general so this # is commented, if we want to write them out at some point, then these lines # should be uncommented and they should get written out # ('xAOD::TrackParticleContainer#HLT_IDTrack_BeamSpot_FTF', 'BS ESD AODFULL', 'ID', 'inViews:beamspotViewRoIs' ), @@ -367,9 +373,6 @@ TriggerHLTListRun3 = [ ('xAOD::JetContainer#HLT_GSCJet', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet', 'inViews:BTagViews'), ('xAOD::JetAuxContainer#HLT_GSCJetAux.', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet'), - # vertex for b-jets - ('xAOD::VertexContainer#HLT_EFHistoPrmVtx', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet'), - ('xAOD::VertexAuxContainer#HLT_EFHistoPrmVtxAux.', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet'), # bjet b-tagging ('xAOD::BTaggingContainer#HLT_BTagging', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'Bjet', 'inViews:BTagViews'), diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py index 56188de40fa..bd983492a07 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py @@ -614,7 +614,7 @@ if opt.reverseViews or opt.filterViews: viewMakers = collectViewMakers( topSequence ) theFilter = [] if opt.filterViews: - theFilter = [ "Cache", "EventInfo", "HLT_EFHistoPrmVtx" ] + theFilter = [ "Cache", "EventInfo", "HLT_IDVertex_FS" ] for alg in viewMakers: alg.ReverseViewsDebug = opt.reverseViews alg.FallThroughFilter = theFilter diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py index da405570bc0..53a1a5e9058 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py @@ -25,7 +25,7 @@ def getBJetSequence(): # ==================================================================================================== def bJetStep2Sequence(): - prmVtxKey = "HLT_EFHistoPrmVtx" + prmVtxKey = "HLT_IDVertex_FS" outputRoIName = "HLT_Roi_Bjet" from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py index b0b6a72fe7b..b6e791509e2 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoConfiguration.py @@ -144,7 +144,7 @@ def defineCalibFilterMods(jetRecoDict,dataSource,rhoKey="auto"): gscDepth = "EM3" if "gsc" in jetRecoDict["jetCalib"]: gscDepth = "trackWIDTH" - pvname = "HLT_EFHistoPrmVtx" + pvname = "HLT_IDVertex_FS" elif jetRecoDict["dataType"]=="pf": gscDepth = "auto" @@ -152,7 +152,7 @@ def defineCalibFilterMods(jetRecoDict,dataSource,rhoKey="auto"): calibSeq = "JetArea_Residual_EtaJES_GSC" if jetRecoDict["jetCalib"].endswith("IS"): calibSeq += "_Insitu" - pvname = "HLT_EFHistoPrmVtx" + pvname = "HLT_IDVertex_FS" calibSpec = ":".join( [calibContext, dataSource, calibSeq, rhoKey, pvname, gscDepth] ) from .TriggerJetMods import ConstitFourMom_copy diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py index 23a12bd0493..97789cf114e 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py @@ -20,10 +20,10 @@ def JetTrackingSequence(dummyFlags,trkopt,RoIs): viewAlgs = makeInDetAlgsNoView( "JetFS", "FS", rois=RoIs ) jetTrkSeq += viewAlgs tracksname = recordable("HLT_IDTrack_FS_FTF") - verticesname = recordable("HLT_EFHistoPrmVtx") + verticesname = recordable("HLT_IDVertex_FS") from TrigInDetConfig.TrigInDetPriVtxConfig import makeVertices - vtxAlgs = makeVertices( "jet", "HLT_IDTrack_FS_FTF", verticesname ) + vtxAlgs = makeVertices( "jet", tracksname, verticesname ) prmVtx = vtxAlgs[-1] jetTrkSeq += prmVtx diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py index aed3c8e8234..8b4318d8a45 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MET/AlgConfigs.py @@ -121,7 +121,7 @@ class TrkMHTConfig(AlgConfig): # These are the names set by the upstream algorithms. Unfortunately # these aren't passed to us - we just have to 'know' them tracks = "HLT_IDTrack_FS_FTF" - vertices = "HLT_EFHistoPrmVtx" + vertices = "HLT_IDVertex_FS" tva = "JetTrackVtxAssoc_{trkopt}".format(**jetRecoDict) track_links = "GhostTrack_{trkopt}".format(**jetRecoDict) @@ -164,7 +164,7 @@ class PFSumConfig(AlgConfig): constit_mod_seq = getConstitModAlg( constit, "HLT", tvaKey="JetTrackVtxAssoc_{trkopt}".format(**jetRecoDict), - vtxKey="HLT_EFHistoPrmVtx") + vtxKey="HLT_IDVertex_FS") self.inputs = [tcSeq, pfseq, constit_mod_seq] self.fexAlg = self._make_fex_alg( HLT__MET__PFSumFex, -- GitLab