ATLAS Offline Software
TrackVertexAssociationToolConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 def getTTVAToolForReco(name="TTVATool", **kwargs):
7 
8  # set default values for AMVF decoration properties, in case they are not set
9  # passing other values in kwargs will override these, if you are using a custom vertex container (eg. HIGG1D1 jet reconstruction)
10  kwargs.setdefault("AMVFVerticesDeco", "TTVA_AMVFVertices_forReco")
11  kwargs.setdefault("AMVFWeightsDeco", "TTVA_AMVFWeights_forReco")
12 
13  return CompFactory.CP.TrackVertexAssociationTool(name, **kwargs)
14 
15 def TTVAToolCfg(flags, name, addDecoAlg=True, VertexContName="PrimaryVertices", **kwargs):
16  """Create a component accumulator containing a TTVA tool
17 
18  If addDecoAlg is True, also adds an algorithm for decorating the 'used-in-fit' information
19  """
20 
21  acc = ComponentAccumulator()
22 
23  kwargs.setdefault("TrackContName", "InDetTrackParticles")
24 
25  acc.setPrivateTools(getTTVAToolForReco(name, **kwargs))
26 
27  if addDecoAlg:
28  from InDetUsedInFitTrackDecoratorTool.UsedInVertexFitTrackDecoratorConfig import (
29  UsedInVertexFitTrackDecoratorCfg)
31  flags, kwargs["TrackContName"], VertexContName))
32 
33  return acc
34 
35 
36 def isoTTVAToolCfg(flags, name="ttvaToolForIso", **kwargs):
37  kwargs.setdefault("WorkingPoint", "Nonprompt_All_MaxWeight")
38  kwargs.setdefault("HardScatterLinkDeco", "")
39  return TTVAToolCfg(flags, name, **kwargs)
40 
41 
42 def TauTTVAToolCfg(flags, name="TVATool", **kwargs):
43  kwargs.setdefault("WorkingPoint", "Nonprompt_Hard_MaxWeight")
44  kwargs.setdefault("HardScatterLinkDeco", "")
45  kwargs.setdefault("TrackContName", flags.Tau.ActiveConfig.TrackCollection)
46  kwargs.setdefault("VertexContName", flags.Tau.ActiveConfig.VertexCollection)
47  return TTVAToolCfg(flags, flags.Tau.ActiveConfig.prefix + name, **kwargs)
48 
49 
50 def CVF_TTVAToolCfg(flags, name="CVF_TTVATool", **kwargs):
51  kwargs.setdefault("WorkingPoint", "Custom")
52  kwargs.setdefault("HardScatterLinkDeco", "")
53  kwargs.setdefault("d0_cut", 2.0)
54  kwargs.setdefault("dzSinTheta_cut", 2.0)
55  return TTVAToolCfg(flags, name, **kwargs)
56 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrackVertexAssociationToolConfig.TauTTVAToolCfg
def TauTTVAToolCfg(flags, name="TVATool", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:42
TrackVertexAssociationToolConfig.CVF_TTVAToolCfg
def CVF_TTVAToolCfg(flags, name="CVF_TTVATool", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:50
TrackVertexAssociationToolConfig.TTVAToolCfg
def TTVAToolCfg(flags, name, addDecoAlg=True, VertexContName="PrimaryVertices", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:15
TrackVertexAssociationToolConfig.getTTVAToolForReco
def getTTVAToolForReco(name="TTVATool", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:6
UsedInVertexFitTrackDecoratorConfig.UsedInVertexFitTrackDecoratorCfg
def UsedInVertexFitTrackDecoratorCfg(flags, trackCont='InDetTrackParticles', vtxCont='PrimaryVertices')
Definition: UsedInVertexFitTrackDecoratorConfig.py:32
TrackVertexAssociationToolConfig.isoTTVAToolCfg
def isoTTVAToolCfg(flags, name="ttvaToolForIso", **kwargs)
Definition: TrackVertexAssociationToolConfig.py:36