Exemple #1
0
def getTauAdaptiveVertexFitter():
    _name = sPrefix + 'TauAdaptiveVertexFitter'
    
    from AthenaCommon.AppMgr import ToolSvc
    
    if _name in cached_instances:
        return cached_instances[_name]
    
    #then the fitter utils
    from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__ImpactPoint3dEstimator
    TauInDetImpactPoint3dEstimator = Trk__ImpactPoint3dEstimator(name = sPrefix+'TauTrkImpactPoint3dEstimator', Extrapolator = getAtlasExtrapolator())
    ToolSvc += TauInDetImpactPoint3dEstimator
    
    from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__DetAnnealingMaker
    TauDetAnnealingMaker = Trk__DetAnnealingMaker(name = sPrefix+'TauDetAnnealingMaker', SetOfTemperatures = [ 64, 32, 16, 8, 4, 2, 1 ] )
    ToolSvc += TauDetAnnealingMaker
    
    #then the fitters (smoother + adaptive with smoothing + fast billoir)
    from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
    TauSequentialVertexSmoother = Trk__SequentialVertexSmoother(name = sPrefix+'TauSequentialVertexSmoother')
    ToolSvc += TauSequentialVertexSmoother
     
    from TrkVertexFitters.TrkVertexFittersConf import Trk__AdaptiveVertexFitter
    from TrigInDetConf.TrigInDetRecVtxTools import InDetTrigVxEdmCnv
    TauAdaptiveVertexFitter = Trk__AdaptiveVertexFitter(name = _name, 
                                                        SeedFinder=getTauCrossDistancesSeedFinder(), 
                                                        ImpactPoint3dEstimator=TauInDetImpactPoint3dEstimator, 
                                                        VertexSmoother=TauSequentialVertexSmoother, 
                                                        AnnealingMaker=TauDetAnnealingMaker,
                                                        LinearizedTrackFactory=getTauFullLinearizedTrackFactory(),
                                                        XAODConverter=InDetTrigVxEdmCnv)
    
    cached_instances[_name] = TauAdaptiveVertexFitter
    ToolSvc +=TauAdaptiveVertexFitter
    return TauAdaptiveVertexFitter
def toolJetFitterSequentialVertexSmoother(name,
                                          useBTagFlagsDefaults=True,
                                          **options):
    """Sets up a JetFitterSequentialVertexSmoother tool and returns it.

    input:             name: The name of the tool (should be unique).
      useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
                             Note however that this tool has no BTaggingFlags defaults; the option is
                             here only for consistency.
                  **options: Python dictionary with options for the tool.
    output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
    options['name'] = name
    from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
    return Trk__SequentialVertexSmoother(**options)
Exemple #3
0
     Trk__ImpactPoint3dEstimator, Trk__DetAnnealingMaker

FTK_ImpactPoint3dEstimator = Trk__ImpactPoint3dEstimator(
    name="InDetTrigTrkImpactPoint3dEstimator",
    Extrapolator=InDetTrigExtrapolator,
)

ToolSvc += FTK_ImpactPoint3dEstimator

FTK_AnnealingMaker = Trk__DetAnnealingMaker(name="InDetTrigTrkAnnealingMaker")
FTK_AnnealingMaker.SetOfTemperatures = [64., 16., 4., 2., 1.5,
                                        1.]  # not default
ToolSvc += FTK_AnnealingMaker

from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
FTK_VertexSmoother = Trk__SequentialVertexSmoother(
    name="InDetTrigSequentialVertexSmoother")
ToolSvc += FTK_VertexSmoother

from TrkVertexFitters.TrkVertexFittersConf import Trk__AdaptiveVertexFitter
FTK_VxFitterTool = Trk__AdaptiveVertexFitter(
    name="InDetTrigAdaptiveVxFitterTool",
    SeedFinder=FTK_VtxSeedFinder,
    LinearizedTrackFactory=InDetTrigLinFactory,
    ImpactPoint3dEstimator=FTK_ImpactPoint3dEstimator,
    AnnealingMaker=FTK_AnnealingMaker,
    #TrackCompatibilityEstimator =
    VertexSmoother=FTK_VertexSmoother,
    #VertexUpdator = ,  #does not use any tools?
    #onlyzseed = ,
)
Exemple #4
0
    VertexWeightCalculator = Trk__TrueVertexDistanceWeightCalculator(
        name="InDetTrueVertexDistanceWeightCalculator",
        McTruthCollection=InDetKeys.McEventCollection())
    ToolSvc += VertexWeightCalculator
    printfunc(VertexWeightCalculator)
    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')

    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')
    VertexCollectionSortingTool.VertexWeightCalculator = VertexWeightCalculator
    printfunc(VertexCollectionSortingTool)
    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')

    # --- fix vertexing smoother setup
    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')
    from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
    InDetVertexSmoother = Trk__SequentialVertexSmoother()
    ToolSvc += InDetVertexSmoother
    printfunc(InDetVertexSmoother)
    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')

    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')
    InDetVxFitterTool.VertexSmoother = InDetVertexSmoother
    printfunc(InDetVxFitterTool)
    printfunc('===> OVERWRITTEN TOOL SETTINGS ................')

    # --- turn off cluster calibration from DB, does not exist for IBL
    from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg
    PixelConfigCondAlg.UseCalibConditions = False
    PixelConfigCondAlg.UseDeadmapConditions = False

# --- switch alignment for IBL geometry off (gives WARNING)
Exemple #5
0
    InDetImpactPoint3dEstimator = Trk__ImpactPoint3dEstimator(
        name="InDetImpactPoint3dEstimator", Extrapolator=InDetExtrapolator)
    ToolSvc += InDetImpactPoint3dEstimator
    if (InDetFlags.doPrintConfigurables()):
        printfunc(InDetImpactPoint3dEstimator)

    from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__DetAnnealingMaker
    InDetAnnealingMaker = Trk__DetAnnealingMaker(
        name="InDetAnnealingMaker",
        SetOfTemperatures=[64., 16., 4., 2., 1.5, 1.])  # not default
    ToolSvc += InDetAnnealingMaker
    if (InDetFlags.doPrintConfigurables()):
        printfunc(InDetAnnealingMaker)

    from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
    InDetVertexSmoother = Trk__SequentialVertexSmoother(
        name="InDetSequentialVertexSmoother")
    ToolSvc += InDetVertexSmoother
    if (InDetFlags.doPrintConfigurables()):
        printfunc(InDetVertexSmoother)

from TrkVertexFitters.TrkVertexFittersConf import Trk__AdaptiveVertexFitter
InDetIncSecVtxFitterTool = Trk__AdaptiveVertexFitter(
    name="AdaptiveVxFitterToolIncSecVtx",
    SeedFinder=InDetIncSecVtxSeedFinder,
    MaxIterations=8000,
    MaxDistToLinPoint=0.2,
    InitialError=0.2,
    LinearizedTrackFactory=InDetLinFactory,
    ImpactPoint3dEstimator=InDetImpactPoint3dEstimator,
    VertexUpdator=IncSecVertexUpdator,
    AnnealingMaker=InDetAnnealingMaker,
Exemple #6
0
def GeneralVertexer(system='Combined', setup=None, tracksName=None, suffix=""):
    """ attempt to make a simple tool for any type of combination of vertexing """
    ToolSvc = Service('ToolSvc')
    hasPix = True if system in ['Combined', 'Pix', 'Resolved'] else False
    hasSCT = True if system in ['Combined', 'SCT', 'Resolved'] else False
    hasTRT = True if system in ['Combined', 'TRT'] else False

    nHitBLayer = InDetPrimaryVertexingCuts.nHitBLayer() if hasPix else 0
    nHitPix = InDetPrimaryVertexingCuts.nHitPix() if hasPix else 0
    nHitBLayerPlusPix = InDetPrimaryVertexingCuts.nHitBLayerPlusPix(
    ) if hasPix else 0
    nHitSct = InDetPrimaryVertexingCuts.nHitSct() if hasSCT else 0
    nHitSi = InDetPrimaryVertexingCuts.nHitSi() if hasSCT else 0
    nHitTrt = InDetPrimaryVertexingCuts.nHitTrt() if hasTRT else 0

    vxSetup = InDetFlags.primaryVertexSetup() if setup == None else setup

    print "JW: Setup is: ", system, hasPix, hasSCT, hasTRT, tracksName, setup, vxSetup

    #Extras

    try:
        InDetTrackZ0SortingTool = ToolSvc.InDetTrackZ0SortingTool
    except:
        from InDetMultipleVertexSeedFinderUtils.InDetMultipleVertexSeedFinderUtilsConf import InDet__InDetTrackZ0SortingTool
        InDetTrackZ0SortingTool = InDet__InDetTrackZ0SortingTool(
            name="InDetTrackZ0SortingTool")
        ToolSvc += InDetTrackZ0SortingTool
        if (InDetFlags.doPrintConfigurables()):
            print InDetTrackZ0SortingTool

    try:
        InDetSlidingWindowMultiSeedFinder = ToolSvc.InDetSlidingWindowMultiSeedFinder
    except:
        from InDetMultipleVertexSeedFinder.InDetMultipleVertexSeedFinderConf import InDet__SlidingWindowMultiSeedFinder
        InDetSlidingWindowMultiSeedFinder = InDet__SlidingWindowMultiSeedFinder(
            name="InDetSlidingWindowMultiSeedFinder",
            clusterLength=5. * mm,
            TrackSelector=InDetTrackSelectorTool,
            Extrapolator=InDetExtrapolator,
            SortingTool=InDetTrackZ0SortingTool,
            #UseMaxInCluster = True
        )
        ToolSvc += InDetSlidingWindowMultiSeedFinder

    #Load additional fitters:
    try:
        InDetVKalVrtFitter = ToolSvc.InDetVKalVrtFitter
        print " JW Found InDetVKalVrtFitter"
    except:
        print " JW no InDetVKalVrtFitter"
        from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
        InDetVKalVrtFitter = Trk__TrkVKalVrtFitter(name="InDetVKalVrtFitter")
        ToolSvc += InDetVKalVrtFitter
        if (InDetFlags.doPrintConfigurables()):
            print InDetVKalVrtFitter

    try:
        InDetVxFitterToolFastFinder = ToolSvc.InDetVxFitterToolFastFinder
        print " JW: found InDetVxFitterToolFastFinder"
    except:
        print "JW no InDetVxFitterToolFastFinder"
        from TrkVertexBilloirTools.TrkVertexBilloirToolsConf import Trk__FastVertexFitter
        InDetVxFitterToolFastFinder = Trk__FastVertexFitter(
            name="InDetVxFitterToolFastFinder",
            LinearizedTrackFactory=InDetLinFactory,
            Extrapolator=InDetExtrapolator)
        ToolSvc += InDetVxFitterToolFastFinder
        if (InDetFlags.doPrintConfigurables()):
            print InDetVxFitterToolFastFinder

    try:
        InDetVxFitterToolFullFinder = ToolSvc.InDetVxFitterToolFullFinder
        print "JW found InDetVxFitterToolFullFinder"
    except:
        print "JW no InDetVxFitterToolFullFinder"
        from TrkVertexBilloirTools.TrkVertexBilloirToolsConf import Trk__FullVertexFitter
        InDetVxFitterToolFullFinder = Trk__FullVertexFitter(
            name="InDetVxFitterToolFullFinder",
            LinearizedTrackFactory=InDetLinFactory,
            Extrapolator=InDetExtrapolator)
        ToolSvc += InDetVxFitterToolFullFinder
        if (InDetFlags.doPrintConfigurables()):
            print InDetVxFitterToolFullFinder

    try:
        print "JW Found InDetVxFitterToolSequential"
    except:
        print "JW no InDetVxFitterToolSequential"
        from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
        InDetVertexSmoother = Trk__SequentialVertexSmoother(
            name="InDetVertexSmoother")
        ToolSvc += InDetVertexSmoother
        if (InDetFlags.doPrintConfigurables()):
            print InDetVertexSmoother

        from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexFitter
        InDetVxFitterToolSequential = Trk__SequentialVertexFitter(
            name="InDetSequentialVxFitterTool",
            LinearizedTrackFactory=InDetLinFactory,
            VertexSmoother=InDetVertexSmoother
            #VertexUpdator   = # no setting required
        )
        ToolSvc += InDetVxFitterToolSequential
        if (InDetFlags.doPrintConfigurables()):
            print InDetVxFitterToolSequential

    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    InDetTrackSelectorTool_vx = InDet__InDetDetailedTrackSelectorTool(
        name="InDetDetailedTrackSelectorTool_" + system + "_" + vxSetup +
        suffix,
        pTMin=InDetPrimaryVertexingCuts.minPT(),
        IPd0Max=InDetPrimaryVertexingCuts.IPd0Max(),
        IPz0Max=InDetPrimaryVertexingCuts.IPz0Max(),
        z0Max=InDetPrimaryVertexingCuts.z0Max(),
        sigIPd0Max=InDetPrimaryVertexingCuts.sigIPd0Max(),
        sigIPz0Max=InDetPrimaryVertexingCuts.sigIPz0Max(),
        d0significanceMax=InDetPrimaryVertexingCuts.d0significanceMax(),
        z0significanceMax=InDetPrimaryVertexingCuts.z0significanceMax(),
        etaMax=InDetPrimaryVertexingCuts.etaMax(),
        useTrackSummaryInfo=InDetPrimaryVertexingCuts.useTrackSummaryInfo(),
        nHitBLayer=nHitBLayer,
        nHitPix=nHitPix,
        nHitBLayerPlusPix=nHitBLayerPlusPix,
        nHitSct=nHitSct,
        nHitSi=nHitSi,
        nHitTrt=nHitTrt,
        nHitTrtHighEFractionMax=InDetPrimaryVertexingCuts.
        nHitTrtHighEFractionMax(),
        nHitTrtHighEFractionWithOutliersMax=InDetPrimaryVertexingCuts.
        nHitTrtHighEFractionWithOutliersMax(),
        useSharedHitInfo=InDetPrimaryVertexingCuts.useSharedHitInfo(),
        useTrackQualityInfo=InDetPrimaryVertexingCuts.useTrackQualityInfo(),
        fitChi2OnNdfMax=InDetPrimaryVertexingCuts.fitChi2OnNdfMax(),
        TrtMaxEtaAcceptance=InDetPrimaryVertexingCuts.TrtMaxEtaAcceptance(),
        TrackSummaryTool=InDetTrackSummaryTool,
        Extrapolator=InDetExtrapolator)

    ToolSvc += InDetTrackSelectorTool_vx
    if (InDetFlags.doPrintConfigurables()):
        print InDetTrackSelectorTool_vx

    # -----------------------------------------
    #
    # ----- load primary vertex finder tool
    #
    # -----------------------------------------

    if (not (vxSetup == 'AdaptiveFinding')
            and not (vxSetup == 'AdaptiveMultiFinding')
            and not (vxSetup == 'DefaultVKalVrtFinding')
            and not (vxSetup == 'InDetPriVxFinderFullFinder')
            and not (vxSetup == 'InDetPriVxFinderFastFinder')):
        #
        # --- load primary vertex finder tool
        #
        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetPriVxFinderTool
        InDetPriVxFinderTool_vx = InDet__InDetPriVxFinderTool(
            name="InDetPriVxFinderTool_" + system + "_" + vxSetup + suffix,
            PriVxSeedFinder=InDetMultiSeedFinder,
            TrackSelector=InDetTrackSelectorTool_vx,
            VertexFitterTool=InDetVxFitterTool,
            chi2CutMethod=2,
            useBeamConstraint=InDetFlags.useBeamConstraint())
        if jobproperties.Beam.numberOfCollisions(
        ) > 2.0:  # 900 GeV running at "zero lumi" has 2.0 for this variable
            InDetPriVxFinderTool_vx.enableMultipleVertices = 1
        else:
            InDetPriVxFinderTool_vx.enableMultipleVertices = 0

        if rec.Commissioning():
            InDetPriVxFinderTool_vx.maxChi2PerTrack = 15.

    elif vxSetup == 'AdaptiveFinding':
        #
        # --- load adaptive primary vertex finder
        #

        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetIterativePriVxFinderTool
        InDetPriVxFinderTool_vx = InDet__InDetIterativePriVxFinderTool(
            name="InDetIterativePriVxFinderTool_" + system + "_" + vxSetup +
            suffix,
            VertexFitterTool=InDetVxFitterTool,
            TrackSelector=InDetTrackSelectorTool_vx,
            SeedFinder=InDetVtxSeedFinder,
            ImpactPoint3dEstimator=InDetImpactPoint3dEstimator,
            LinearizedTrackFactory=InDetLinFactory,
            useBeamConstraint=InDetFlags.useBeamConstraint(),
            significanceCutSeeding=12,
            maximumChi2cutForSeeding=49,
            maxVertices=25)

    elif vxSetup == 'AdaptiveMultiFinding':
        #
        # --- load adaptive multi primary vertex finder
        #
        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetAdaptiveMultiPriVxFinderTool
        InDetPriVxFinderTool_vx = InDet__InDetAdaptiveMultiPriVxFinderTool(
            name="InDetAdaptiveMultiPriVxFinderTool_" + system + "_" +
            vxSetup + suffix,
            SeedFinder=InDetVtxSeedFinder,
            VertexFitterTool=InDetVxFitterTool,
            TrackSelector=InDetTrackSelectorTool_vx,
            useBeamConstraint=InDetFlags.useBeamConstraint(),
            selectiontype=0,
            do3dSplitting=InDetFlags.doPrimaryVertex3DFinding())

    #Add additional finder tools
    elif vxSetup == 'InDetPriVxFinderFastFinder':  # not the official name

        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetPriVxFinderTool
        InDetPriVxFinderTool_vx = InDet__InDetPriVxFinderTool(
            name="InDetPriVxFinderToolFastFinder_" + system + "_" + vxSetup +
            suffix,
            VertexFitterTool=InDetVxFitterToolFastFinder,
            PriVxSeedFinder=InDetSlidingWindowMultiSeedFinder,
            TrackSelector=InDetTrackSelectorTool_vx,
            useBeamConstraint=InDetFlags.useBeamConstraint())
        if jobproperties.Beam.zeroLuminosity():
            InDetPriVxFinderTool_vx.enableMultipleVertices = 0
        else:
            InDetPriVxFinderTool_vx.enableMultipleVertices = 1

    elif vxSetup == 'InDetPriVxFinderFullFinder':
        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetPriVxFinderTool
        InDetPriVxFinderTool_vx = InDet__InDetPriVxFinderTool(
            name="InDetPriVxFinderToolFullFinder_" + system + "_" + vxSetup +
            suffix,
            VertexFitterTool=InDetVxFitterToolFullFinder,
            PriVxSeedFinder=InDetSlidingWindowMultiSeedFinder,
            TrackSelector=InDetTrackSelectorTool_vx,
            useBeamConstraint=InDetFlags.useBeamConstraint())
        if jobproperties.Beam.zeroLuminosity():
            InDetPriVxFinderTool_vx.enableMultipleVertices = 0
        else:
            InDetPriVxFinderTool_vx.enableMultipleVertices = 1

    ToolSvc += InDetPriVxFinderTool_vx
    if (InDetFlags.doPrintConfigurables()):
        print InDetPriVxFinderTool_vx

    from InDetPriVxFinder.InDetPriVxFinderConf import InDet__InDetPriVxFinder
    InDetPriVxFinder_vx = InDet__InDetPriVxFinder(
        name="InDetPriVxFinder_" + system + "_" + vxSetup,
        VertexFinderTool=InDetPriVxFinderTool_vx,
        TracksName=tracksName,
        VxCandidatesOutputName=InDetKeys.PrimaryVertices() + "_" + system +
        "_" + vxSetup + suffix,
        VertexCollectionSortingTool=VertexCollectionSortingTool,
        doVertexSorting=doSorting,
        OutputLevel=DEBUG)
    from AthenaCommon.AlgSequence import AlgSequence
    topSequence = AlgSequence()
    topSequence += InDetPriVxFinder_vx
    pvFinders.append(InDetPriVxFinder_vx)
    primaryVertices.append(InDetPriVxFinder_vx.VxCandidatesOutputName)
    if InDetFlags.doPrintConfigurables():
        print InDetPriVxFinder_vx

    Stream.AddItem([
        'VxContainer#' + InDetKeys.PrimaryVertices() + "_" + system + "_" +
        vxSetup + suffix
    ])

    return (InDetTrackSelectorTool_vx, InDetPriVxFinderTool_vx,
            InDetPriVxFinder_vx)
  from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__FullLinearizedTrackFactory
  JetFitterLinFactory = Trk__FullLinearizedTrackFactory(name              = "JetFitterFullLinearizedTrackFactory",
                                                      Extrapolator      = JetFitterExtrapolator)
  ToolSvc += JetFitterLinFactory
  if BTaggingFlags.OutputLevel < 3:
    print      JetFitterLinFactory

  from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__Mode3dTo1dFinder
  mode3dfinder = Trk__Mode3dTo1dFinder(name = "JetFitterMode3dTo1dFinder")
  
  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 TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexFitter
  sequentialVtxFitter = Trk__SequentialVertexFitter(name = "JetFitterSequentialVertexFitter",
                                                    VertexSmoother= vertexsmoother,
                                                    LinearizedTrackFactory=JetFitterLinFactory)

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

Exemple #8
0
    def __init__(self, name="ConfiguredFTK_DataProviderSvc"):
        print "In FTK_DataProviderSvc_Config.py"
        FTK_DataProviderSvc.__init__(self, name)
        # Track Fitter
        from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter
        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator, InDetTrigNavigator, InDetTrigPropagator, InDetTrigRefitRotCreator,InDetTrigBroadInDetRotCreator, \
             InDetTrigUpdator, InDetTrigMaterialUpdator, InDetTrigUpdator, InDetTrigMaterialUpdator
        from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc

        from TrkDistributedKalmanFilter.DistributedKalmanFilter_Config import ConfiguredDistributedKalmanFilter

        FTK_TrackFitter = Trk__GlobalChi2Fitter(
            name="FTK_TrackFitter",
            ExtrapolationTool=InDetTrigExtrapolator,
            NavigatorTool=InDetTrigNavigator,
            PropagatorTool=InDetTrigPropagator,
            RotCreatorTool=InDetTrigRefitRotCreator,
            BroadRotCreatorTool=InDetTrigBroadInDetRotCreator,
            MeasurementUpdateTool=InDetTrigUpdator,
            TrackingGeometrySvc=AtlasTrackingGeometrySvc,
            MaterialUpdateTool=InDetTrigMaterialUpdator,
            StraightLine=False,
            OutlierCut=4,
            SignedDriftRadius=True,
            RecalibrateSilicon=True,
            RecalibrateTRT=True,
            ReintegrateOutliers=True,
            TrackChi2PerNDFCut=7,
            TRTExtensionCuts=False,
            MaxIterations=40,
            Acceleration=True,
            Momentum=1000.,
        )
        from AthenaCommon.AppMgr import ToolSvc

        print "printing FTK_TrackFitter configured with DKF"
        print FTK_TrackFitter
        ToolSvc += FTK_TrackFitter
        print "added FTK_TrackFitter to ToolSvc"

        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator, InDetTrigTrackSelectorTool, InDetTrigHoleSearchTool
        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackSummaryToolSharedHits, InDetTrigPrdAssociationTool

        from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool
        FTK_TrackSummaryHelperTool = InDet__InDetTrackSummaryHelperTool(
            name="FTK_TrackSummaryHelperTool",
            AssoTool=InDetTrigPrdAssociationTool,
            DoSharedHits=False,
            HoleSearch=InDetTrigHoleSearchTool,
            TestBLayerTool=None,
            PixelToTPIDTool=None,
            usePixel=True,
            useSCT=True,
            useTRT=False)

        ToolSvc += FTK_TrackSummaryHelperTool
        print "added FTK_TrackSummaryHelperTool to ToolSvc"

        from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
        FTK_TrackSummaryTool = Trk__TrackSummaryTool(
            name="FTK_TrackSummaryTool",
            InDetSummaryHelperTool=FTK_TrackSummaryHelperTool,
            InDetHoleSearchTool=None,
            doSharedHits=False,
            TRT_ElectronPidTool=None)
        ToolSvc += FTK_TrackSummaryTool
        print "added FTK_TrackSummaryTool to ToolSvc"

        from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool

        FTK_TrackParticleCreatorTool = Trk__TrackParticleCreatorTool(
            name="FTK_ParticleCreatorTool",
            Extrapolator=InDetTrigExtrapolator,
            TrackSummaryTool=FTK_TrackSummaryTool,
            KeepParameters=True,
            ForceTrackSummaryUpdate=
            False,  #summary update moved (in the slimmer now)
        )

        ToolSvc += FTK_TrackParticleCreatorTool
        print FTK_TrackParticleCreatorTool
        print " added FTK_TrackParticleCreatorTool to ToolSvc"

        from TrigInDetConf.TrigInDetRecVtxTools import InDetTrigLinFactory, InDetTrigVxEdmCnv
        from TrigInDetConf.TrigInDetRecVtxTools import InDetTrigLinFactory, InDetTrigVxEdmCnv

        from TrkVertexSeedFinderTools.TrkVertexSeedFinderToolsConf import Trk__ZScanSeedFinder
        FTK_VtxSeedFinder = Trk__ZScanSeedFinder(
            name="FTK_ZScanSeedFinder"
            #Mode1dFinder = # default, no setting needed
        )
        ToolSvc += FTK_VtxSeedFinder

        from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__ImpactPoint3dEstimator, Trk__DetAnnealingMaker

        FTK_ImpactPoint3dEstimator = Trk__ImpactPoint3dEstimator(
            name="FTK_TrkImpactPoint3dEstimator",
            Extrapolator=InDetTrigExtrapolator,
        )

        ToolSvc += FTK_ImpactPoint3dEstimator

        FTK_AnnealingMaker = Trk__DetAnnealingMaker(
            name="FTK_TrkAnnealingMaker")
        FTK_AnnealingMaker.SetOfTemperatures = [64., 16., 4., 2., 1.5,
                                                1.]  # not default
        ToolSvc += FTK_AnnealingMaker

        from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
        FTK_VertexSmoother = Trk__SequentialVertexSmoother(
            name="FTK_SequentialVertexSmoother")
        ToolSvc += FTK_VertexSmoother

        from TrkVertexFitters.TrkVertexFittersConf import Trk__AdaptiveVertexFitter
        FTK_VxFitterTool = Trk__AdaptiveVertexFitter(
            name="FTK_AdaptiveVxFitterTool",
            SeedFinder=FTK_VtxSeedFinder,
            LinearizedTrackFactory=InDetTrigLinFactory,
            ImpactPoint3dEstimator=FTK_ImpactPoint3dEstimator,
            AnnealingMaker=FTK_AnnealingMaker,
            #TrackCompatibilityEstimator =
            VertexSmoother=FTK_VertexSmoother,
            #VertexUpdator = ,  #does not use any tools?
            #onlyzseed = ,
        )

        FTK_VxFitterTool.XAODConverter = InDetTrigVxEdmCnv
        ToolSvc += FTK_VxFitterTool

        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetIterativePriVxFinderTool
        FTK_PriVxFinderTool = InDet__InDetIterativePriVxFinderTool(
            name="FTK_PriVxFinderTool",
            VertexFitterTool=FTK_VxFitterTool,
            TrackSelector=InDetTrigTrackSelectorTool,
            SeedFinder=FTK_VtxSeedFinder,
            ImpactPoint3dEstimator=FTK_ImpactPoint3dEstimator,
            LinearizedTrackFactory=InDetTrigLinFactory,
            useBeamConstraint=True,
            significanceCutSeeding=12,
            maximumChi2cutForSeeding=49,
            maxVertices=200,
            InternalEdmFactory=InDetTrigVxEdmCnv)
        ToolSvc += FTK_PriVxFinderTool

        from FTK_DataProviderSvc.FTK_DataProviderSvcConf import FTK_UncertaintyTool
        theFTK_UncertaintyTool = FTK_UncertaintyTool(
            name="FTK_UncertaintyTool")
        ToolSvc += theFTK_UncertaintyTool

        from FTK_RecTools.FTK_RecToolsConf import FTK_VertexFinderTool
        FTK_RawVertexFinderTool = FTK_VertexFinderTool(
            name="FTK_RawVertexFinderTool",
            VertexInternalEdmFactory=InDetTrigVxEdmCnv)
        ToolSvc += FTK_RawVertexFinderTool

        self.TrackCollectionName = "FTK_TrackCollection"
        self.TrackParticleContainerName = "FTK_TrackParticleContainer"
        self.VxContainerName = "FTK_VxContainer"
        self.VertexContainerName = "FTK_VertexContainer"
        self.PixelTruthName = "FTK_PRD_MultiTruthPixel"
        self.SctTruthName = "FTK_PRD_MultiTruthSCT"
        self.PixelClusterContainerName = "FTK_PixelClusterContainer"
        self.SCT_ClusterContainerName = "FTK_SCT_ClusterContainer"

        self.TrackFitter = FTK_TrackFitter
        self.UncertaintyTool = theFTK_UncertaintyTool
        self.TrackSummaryTool = FTK_TrackSummaryTool
        self.TrackParticleCreatorTool = FTK_TrackParticleCreatorTool
        self.RawVertexFinderTool = FTK_RawVertexFinderTool
        self.VertexFinderTool = FTK_PriVxFinderTool
        from RecExConfig.RecFlags import rec

        self.doTruth = rec.doTruth()
        self.TrainingBeamspotX = 0.0
        self.TrainingBeamspotY = 0.0
        self.TrainingBeamspotZ = 0.0
        self.TrainingBeamspotTiltX = 0.0
        self.TrainingBeamspotTiltY = 0.0
        self.PixelBarrelPhiOffsets = [0.0, 0.0, 0.0, 0.0]
        self.PixelBarrelEtaOffsets = [0.0, 0.0, 0.0, 0.0]
        self.PixelEndCapPhiOffsets = [0.0, 0.0, 0.0]
        self.PixelEndCapEtaOffsets = [0.0, 0.0, 0.0]