def toolVxInternalEdmFactory(name, useBTagFlagsDefaults=True, **options):
    """Sets up a VxInternalEdmFactory tool and returns it.
    
    The following options have BTaggingFlags defaults:

    OutputLevel                         default: BTaggingFlags.OutputLevel

    input:             name: The name of the tool (should be unique).
      useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
                  **options: Python dictionary with options for the tool.
    output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
    if useBTagFlagsDefaults:
        defaults = {
            'OutputLevel': BTaggingFlags.OutputLevel,
        }
        for option in defaults:
            options.setdefault(option, defaults[option])
    options['name'] = name
    from TrkVxEdmCnv.TrkVxEdmCnvConf import Trk__VxCandidateXAODVertex
    return Trk__VxCandidateXAODVertex(**options)
示例#2
0
from AthenaCommon.AppMgr import ToolSvc
from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags

#
# load linearized track factory
#
from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__FullLinearizedTrackFactory
from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator

InDetTrigLinFactory = Trk__FullLinearizedTrackFactory(
    name="InDetTrigFullLinearizedTrackFactory",
    Extrapolator=InDetTrigExtrapolator,
)
ToolSvc += InDetTrigLinFactory
if (InDetTrigFlags.doPrintConfigurables()):
    print InDetTrigLinFactory

#
# VxEDMCnv
#
from TrkVxEdmCnv.TrkVxEdmCnvConf import Trk__VxCandidateXAODVertex

InDetTrigVxEdmCnv = Trk__VxCandidateXAODVertex(
    name="TrigVertexInternalEdmFactory")
InDetTrigVxEdmCnv.LinearizedTrackFactory = InDetTrigLinFactory
ToolSvc += InDetTrigVxEdmCnv

if (InDetTrigFlags.doPrintConfigurables()):
    print InDetTrigVxEdmCnv
ToolSvc += mode3dfinder
if BTaggingFlags.OutputLevel < 3:
  print mode3dfinder

from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
vertexsmoother = Trk__SequentialVertexSmoother(name = "JetFitterSequentialVertexSmoother")

ToolSvc += vertexsmoother
if BTaggingFlags.OutputLevel < 3:
  print vertexsmoother


from TrkVxEdmCnv.TrkVxEdmCnvConf import Trk__VxCandidateXAODVertex
InDetVxIntEdmCnv = Trk__VxCandidateXAODVertex(name="VxInternalEdmFactory",
                                           LinearizedTrackFactory=JetFitterLinFactory,
                                           OutputLevel =BTaggingFlags.OutputLevel)
ToolSvc += InDetVxIntEdmCnv
if BTaggingFlags.OutputLevel < 3:
  print InDetVxIntEdmCnv

from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexFitter
sequentialVtxFitter = Trk__SequentialVertexFitter(name = "JetFitterSequentialVertexFitter",
                                                  VertexSmoother= vertexsmoother,
                                                  LinearizedTrackFactory=JetFitterLinFactory,
						  XAODConverter=InDetVxIntEdmCnv)


ToolSvc += sequentialVtxFitter
if BTaggingFlags.OutputLevel < 3:
  print sequentialVtxFitter