From 2391c60c8016fc49cf7cd2078f50e4b7fdc93a4f Mon Sep 17 00:00:00 2001 From: Roshan Joshi Date: Tue, 17 May 2022 13:34:04 +0200 Subject: [PATCH 1/2] Added flowchart for VR track jet reconstruction in ModuleOverview.md and switched to JetTrackVtxAssoAlg from TrackVertexAssociationTool for track to vertex association while reconstructing PV0Tracks --- .../JetRecTools/python/JetRecToolsConfig.py | 13 ++-- .../python/HLT/Jet/JetTrackingConfig.py | 8 +-- .../python/HLT/Jet/docs/ModuleOverview.md | 66 +++++++++++++++++++ 3 files changed, 75 insertions(+), 12 deletions(-) diff --git a/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py b/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py index 3a09980dfd4..ae93983b239 100644 --- a/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py +++ b/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py @@ -98,7 +98,7 @@ def getJetTrackVtxAlg( trkOpt, algname="jetTVA", **ttva_overide): -def getPV0TrackVertexAssocTool(trkOpt="", theSequence=None): +def getPV0TrackVertexAssoAlg(trkOpt="", theSequence=None): if trkOpt: "_{}".format(trkOpt) from TrackVertexAssociationTool.getTTVAToolForReco import getTTVAToolForReco from JetRecConfig.StandardJetContext import jetContextDic @@ -106,15 +106,16 @@ def getPV0TrackVertexAssocTool(trkOpt="", theSequence=None): trkProperties = jetContextDic[trkOpt] tvatool = getTTVAToolForReco("trackjettvassoc", WorkingPoint = "Nonprompt_All_MaxWeight", - TrackContName = trkProperties["JetTracksQualityCuts"], + TrackContName = trkProperties["JetTracks"], VertexContName = trkProperties["Vertices"], returnCompFactory = True, add2Seq = theSequence, - addDecoAlg = isAthenaRelease(), + addDecoAlg = False, #setting this to True causes error in reconstruction because of there not being aux store associated with one of the decorations + #It has also been set to false in buildPV0TrackSel function in JetRecConfig/python/JetInputConfig.py ) - jettvassoc = CompFactory.TrackVertexAssociationTool("trackjetTTVAtool", - TrackParticleContainer = trkProperties["JetTracksQualityCuts"], + jettvassoc = CompFactory.JetTrackVtxAssoAlg("trackjetTVAAlg", + TrackParticleContainer = trkProperties["JetTracks"], TrackVertexAssociation = "PV0"+trkProperties["TVA"], VertexContainer = trkProperties["Vertices"], TrackVertexAssoTool = tvatool @@ -125,7 +126,7 @@ def getPV0TrackSelAlg(tvaTool, trkOpt="default"): from JetRecConfig.StandardJetContext import jetContextDic trkProperties = jetContextDic[trkOpt] pv0trackselalg = CompFactory.PV0TrackSelectionAlg("pv0tracksel_trackjet", - InputTrackContainer = trkProperties["JetTracksQualityCuts"], + InputTrackContainer = trkProperties["JetTracks"], VertexContainer = trkProperties["Vertices"], OutputTrackContainer = "PV0"+trkProperties["JetTracks"], TVATool = tvaTool, diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py index 2ea46eff796..a9ebf70cea4 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/JetTrackingConfig.py @@ -211,13 +211,9 @@ def jetTTVA( signature, jetseq, trkopt, config, verticesname=None, adaptiveVerte from AthenaConfiguration.AllConfigFlags import ConfigFlags if ConfigFlags.Trigger.Jet.doVRJets: - jettrackselalg = jrtcfg.getTrackSelAlg( trkopt, trackSelOpt=True ) - jetseq += conf2toConfigurable( jettrackselalg ) - pv0_jettvassoc, pv0_ttvatool = jrtcfg.getPV0TrackVertexAssocTool(trkopt, jetseq) - pv0jettrkprepalg = CompFactory.JetAlgorithm("pv0jetalg_TrackPrep"+trkopt, - Tools = [ pv0_jettvassoc ]) + pv0_jettvassoc, pv0_ttvatool = jrtcfg.getPV0TrackVertexAssoAlg(trkopt, jetseq) pv0trackselalg = jrtcfg.getPV0TrackSelAlg(pv0_ttvatool, trkopt) - jetseq += conf2toConfigurable( pv0jettrkprepalg ) + jetseq += conf2toConfigurable( pv0_jettvassoc ) jetseq += conf2toConfigurable( pv0trackselalg ) # make sure we output only the key,value related to tracks (otherwise, alg duplication issues) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md index e1c14edc65d..d7c2ee96740 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md @@ -68,6 +68,72 @@ This scheduling is basically handled by menu construction. As a rule of thumb, w +
+ Flowchart for VR track jet reconstruction + +Variable Radius (VR) track jets are useful in b-tagging of large-R jets. A large-R jet can be b-tagged by performing b-tagging on the VR track jets associated with it. The association method that is commonly used is ghost association. + +The flowchart that follows details the steps in VR track jet reconstruction. The logic behind the steps is as follows: In order to reconstruct a jet, we need a `JetDefinition`. The JetDefinition requires an input constituent, which in this case would be the primary vertex tracks. So we need to perform track selection to get the required tracks. Using these tracks we create a VR track jet JetDefinition, which is then used to create VR track jet reconstruction sequence. + +```mermaid +%%{init: {"flowchart": { "useMaxWidth": false } }}%% +flowchart TD; + + subgraph JetRecToolsConfig.py + PV0TrkInputCont[/Pre reqs: JetSelectedTracks_ftf, HLT_IDVertex_FS/] + TVA["Use TrackVertexAssociationTool (TVA)
on these tracks and vertices"] + PV0TrkInputCont--getPV0TrackVertexAssoAlg-->TVA + PV0TrkSelAlg[Use PV0TrackSelectionAlg
on same tracks and vertices with the TVA] + TVA-- getPV0TrackSelAlg-->PV0TrkSelAlg + end + + subgraph JetTrackingConfig.py + TrkRecoSeq[Set up reco sequence
for standard tracks] + TrkOutCont[/JetSelectedTracks_ftf/] + TrkOutCont-->PV0TrkInputCont + TrkRecoSeq-->TrkOutCont + TrkTool_And_Alg[Get TVA Tool &
PV0TrackSelectionAlg] + TVA-->TrkTool_And_Alg + TrkOutCont-.-TrkTool_And_Alg + PV0TrkSelAlg-->TrkTool_And_Alg + TrkTool_And_Alg --Add the tool and alg to reco seq-->PV0TrkOutCont + PV0TrkOutCont[/Output Container: PV0JetSelectedTracks_ftf/] + end + + subgraph defineVRTrackJets + InputConstit[/"JetInputConstit: PV0Track
(xAOD type TrackParticle)"/] + PV0TrkOutCont--Source Container -->InputConstit + Parameters[/Rmax, Rmin, VR mass scale, min pt, etc./] + JetDef[Create JetDefinition for VR track jets] + Parameters --> JetDef + InputConstit-->JetDef + end + + subgraph VRJetRecoSequence + VRJetRecoSeqEmpty[Empty reco sequence] + VRJetDef[JetDefinition for VR track jets] + VRJetRecoSeqEmpty-->VRJetDef + JetDef-->VRJetDef + SolveDependencies[Resolve dependencies of JetDefinition
using `solveDependencies`] + VRJetDef-->SolveDependencies + ConstitPJAlg[Get constituent PseudoJet alg
& add it to reco sequence] + SolveDependencies-->ConstitPJAlg + UpdateAttrib[Update name of pseudo jet container
in JetDefinition
that will be used in jet finding] + ConstitPJAlg-->UpdateAttrib + VRTrkJetRecoSeq[Get VR track jet reco alg
& add it to the reco sequence] + ReturnObj[Return reco seq, jet def] + VRTrkJetRecoSeq-->ReturnObj + end + + subgraph JetRecConfig.py + JetRecAlg["Call getJetRecAlg
which sets up jet building with fastjet
(internally calls JetClusterer)"] + UpdateAttrib-.Updated JetDef.->JetRecAlg + JetRecAlg-->VRTrkJetRecoSeq + end + +``` +
+ [GenerateJetChainDefs](../GenerateJetChainDefs.py) ----- -- GitLab From bc3157699ea00d67cd02ed01d75c23a8ba3be219 Mon Sep 17 00:00:00 2001 From: Roshan Joshi Date: Tue, 17 May 2022 21:55:14 +0200 Subject: [PATCH 2/2] Added flowchart for VR track jet reconstruction and allowed it to use maximum width --- .../TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md index d7c2ee96740..d8b3735b42c 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Jet/docs/ModuleOverview.md @@ -76,7 +76,6 @@ Variable Radius (VR) track jets are useful in b-tagging of large-R jets. A large The flowchart that follows details the steps in VR track jet reconstruction. The logic behind the steps is as follows: In order to reconstruct a jet, we need a `JetDefinition`. The JetDefinition requires an input constituent, which in this case would be the primary vertex tracks. So we need to perform track selection to get the required tracks. Using these tracks we create a VR track jet JetDefinition, which is then used to create VR track jet reconstruction sequence. ```mermaid -%%{init: {"flowchart": { "useMaxWidth": false } }}%% flowchart TD; subgraph JetRecToolsConfig.py -- GitLab