コード例 #1
0
def getPhotonConversionTool():

    if jobproperties.tauRecFlags.useVertexBasedConvFinder():
        from AthenaCommon.AppMgr import ToolSvc

        name = "_PhotonConversionVertex"

        ##

        from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MaterialEffectsUpdator
        AtlasMaterialEffectsUpdator = MaterialEffectsUpdator(
            name='AtlasMaterialEffectsUpdator')
        ToolSvc += AtlasMaterialEffectsUpdator  #default material effects updator
        NoElossMaterialEffectsUpdator = MaterialEffectsUpdator(
            name='NoElossMaterialEffectsUpdator')
        NoElossMaterialEffectsUpdator.EnergyLoss = False
        ToolSvc += NoElossMaterialEffectsUpdator

        # setup MaterialEffectsUpdator arrays
        MyUpdators = []
        MyUpdators += [AtlasMaterialEffectsUpdator]  # for ID
        MyUpdators += [NoElossMaterialEffectsUpdator]  # for Calo
        # MyUpdators += [NoElossMaterialEffectsUpdator] # for muon

        MySubUpdators = []
        MySubUpdators += [AtlasMaterialEffectsUpdator.name()]  # for ID
        MySubUpdators += [NoElossMaterialEffectsUpdator.name()]  # for Calo
        MySubUpdators += [NoElossMaterialEffectsUpdator.name()]  # for muon

        #Configure the extrapolator
        from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
        theAtlasExtrapolator = AtlasExtrapolator(name='theAtlasExtrapolator' +
                                                 name)
        theAtlasExtrapolator.DoCaloDynamic = False  # this turns off dynamic
        theAtlasExtrapolator.MaterialEffectsUpdators = MyUpdators
        theAtlasExtrapolator.SubMEUpdators = MySubUpdators
        ToolSvc += theAtlasExtrapolator

        #        from TrkMagFieldTools.TrkMagFieldToolsConf import Trk__MagneticFieldTool
        #        InDetMagField = Trk__MagneticFieldTool('InDetMagField'+name)
        #        ToolSvc += InDetMagField
        ### Ly S swith bellow off Oct 7
        #        from AthenaCommon.AppMgr import ServiceMgr
        #        from MagFieldServices.MagFieldServicesConf import MagField__AtlasFieldSvc
        #        ServiceMgr += MagField__AtlasFieldSvc("myAtlasFieldSvc")

        #
        # Setup track summary tool
        #
        from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels
        tauInDetPrdAssociationTool = InDet__InDetPRD_AssociationToolGangedPixels(
            name="tauInDetPrdAssociationTool",
            PixelClusterAmbiguitiesMapName='PixelClusterAmbiguitiesMap')
        ToolSvc += tauInDetPrdAssociationTool
        from InDetRecExample.InDetJobProperties import InDetFlags
        from InDetTrackHoleSearch.InDetTrackHoleSearchConf import InDet__InDetTrackHoleSearchTool
        tauInDetHoleSearchTool = InDet__InDetTrackHoleSearchTool(
            name="tauInDetHoleSearchTool",
            Extrapolator=theAtlasExtrapolator,
            checkBadSCTChip=InDetFlags.checkDeadElementsOnTrack())
        ToolSvc += tauInDetHoleSearchTool

        from AthenaCommon.DetFlags import DetFlags
        from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool
        tauInDetTrackSummaryHelperTool = InDet__InDetTrackSummaryHelperTool(
            name="tauInDetTrackSummaryHelper",
            AssoTool=tauInDetPrdAssociationTool,
            DoSharedHits=False,
            HoleSearch=tauInDetHoleSearchTool,
            usePixel=DetFlags.haveRIO.pixel_on(),
            useSCT=DetFlags.haveRIO.SCT_on(),
            useTRT=DetFlags.haveRIO.TRT_on())
        ToolSvc += tauInDetTrackSummaryHelperTool

        #        from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
        #        MyInDetTrackSummaryTool = AtlasTrackSummaryTool(
        #                                       InDetSummaryHelperTool = tauInDetTrackSummaryHelperTool,
        #                                       doSharedHits           = False )
        from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
        MyInDetTrackSummaryTool = Trk__TrackSummaryTool(
            name="MyInDetTrackSummaryTool",
            InDetSummaryHelperTool=tauInDetTrackSummaryHelperTool,
            doSharedHits=False,
            InDetHoleSearchTool=tauInDetHoleSearchTool)
        ToolSvc += MyInDetTrackSummaryTool

        from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
        InDetConversionVxFitterTool = Trk__TrkVKalVrtFitter(
            name="InDetConversionVxFitter" + name,
            Extrapolator=theAtlasExtrapolator,
            #                                        Extrapolator        = "Trk::Extrapolator/AtlasExtrapolator",
            IterationNumber=30,
            MakeExtendedVertex=True,
            FirstMeasuredPoint=False,

            #                                        MagFieldSvc         = InDetMagField,
            ##                                       MagFieldSvc="Trk::MagneticFieldTool/InDetMagField",
            #                                        AtlasMagFieldSvc="myAtlasFieldSvc",
            Robustness=6,
            usePhiCnst=True,
            useThetaCnst=True,
            FirstMeasuredPointLimit=True,
            InputParticleMasses=[0.511, 0.511],
            VertexForConstraint=[0., 0., 0.],
            CovVrtForConstraint=[
                0.015 * 0.015, 0., 0.015 * 0.015, 0., 0., 10000. * 10000.
            ])
        ToolSvc += InDetConversionVxFitterTool
        print InDetConversionVxFitterTool

        # Distance of minimum approach utility
        #
        from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__SeedNewtonTrkDistanceFinder
        InDetConversionTrkDistanceFinder = Trk__SeedNewtonTrkDistanceFinder(
            name='InDetConversionTrkDistanceFinder' + name)
        ToolSvc += InDetConversionTrkDistanceFinder
        print InDetConversionTrkDistanceFinder

        # Straight line propagator needed to clean-up single track conversions
        #
        #        from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator

        # Helper Tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionFinderUtils
        InDetConversionHelper = InDet__ConversionFinderUtils(
            name="InDetConversionFinderUtils" + name)
        ToolSvc += InDetConversionHelper
        print InDetConversionHelper

        # Track selector tool
        #
        from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetConversionTrackSelectorTool
        InDetConversionTrackSelector = InDet__InDetConversionTrackSelectorTool(
            name="InDetConversionTrackSelector" + name,
            TrackSummaryTool=MyInDetTrackSummaryTool,
            Extrapolator=theAtlasExtrapolator,
            maxSiD0=10000.,  #50.0,
            maxTrtD0=10000.,  #100.,
            maxSiZ0=10000.,  #350.0,
            maxTrtZ0=10000.,  #1400.,
            minPt=300,  #InDetNewTrackingCuts.minSecondaryPt()
            RatioCut1=0.0,  #0.5,
            RatioCut2=0.05,
            RatioCut3=0.05,
            RatioTRT=0.05,
            IsConversion=True,
            significanceD0_Si=-1.,
            RatioV0=-1.)

        ToolSvc += InDetConversionTrackSelector
        print InDetConversionTrackSelector

        # Track pairs selector
        #
        ## There are many tunings on Oct 5
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__TrackPairsSelector
        InDetConversionTrackPairsSelector = InDet__TrackPairsSelector(
            name="InDetConversionTrackPairsSelector" + name,
            ConversionFinderHelperTool=InDetConversionHelper,
            DistanceTool=InDetConversionTrkDistanceFinder,
            #                             MaxEta                     = [0.12,10000.,10000.],      #[0.5,1.0,0.5])
            MaxEta=[0.15, 0.3, 0.5],  #[0.5,1.0,0.5])
            #                             MaxDistBetweenTracks       = [6.6,10000.,10000.],     #[6.,80.,30.]
            MaxDistBetweenTracks=[7.5, 15., 30.],  #[6.,80.,30.]
            MaxInitDistance=[10000., 10000., 10000.],
            MinTrackAngle=0.)
        ToolSvc += InDetConversionTrackPairsSelector
        print InDetConversionTrackPairsSelector

        # Vertex point estimator
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
        InDetConversionVtxPointEstimator = InDet__VertexPointEstimator(
            name="InDetConversionVtxPointEstimator" + name,
            MaxTrkXYDiffAtVtx=[10000., 10000., 10000.],
            MaxTrkZDiffAtVtx=[10000., 10000., 10000.],
            MaxTrkXYValue=[10000., 10000., 10000.],
            MinArcLength=[-10000., -10000., -10000.],
            MaxArcLength=[10000., 10000., 10000.],
            MinDeltaR=[-5., -25., -50.],
            #                                   MaxDeltaR              = [10000.,10000.,10000.],
            MaxDeltaR=[5., 10., 10.],
            #                                   MaxHl                  = [10000.,10000.,10000.],
            #                                   MaxPhi                 = [0.034, 10000., 10000.] #[0.05, 0.1, 0.1]
            #                                   MaxPhi                 = [ 10000., 10000., 10000.]
            MaxPhi=[0.05, 0.1, 0.2])
        ToolSvc += InDetConversionVtxPointEstimator
        print InDetConversionVtxPointEstimator

        # Conversion post selector
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionPostSelector
        InDetConversionPostSelector = InDet__ConversionPostSelector(
            name="InDetConversionPostSelector" + name,
            #                                      MaxChi2Vtx       = [10000.,10000.,10000.],   #[40.,100.,80.],
            MaxChi2Vtx=[500., 700., 900.],  #[40.,100.,80.],
            #                                      MaxInvariantMass = [45.,25000.,25000.],     #[60.,60.,30.],
            MaxInvariantMass=[350., 400., 500.],  #[60.,60.,30.],
            MinFitMomentum=[0., 0., 0.],  #[2000.,2000.,2000.],
            MinRadius=[21, 20., 15.],  #[30.,35.,250.],
            #                                      MinRadius        = [ -10000.0, -10000.0, -10000.0 ],  #[30.,35.,250.],
            MinPt=0.,
            #                                      MaxdR            = 10000.,               #-250.,
            ## equivalent to InDetConversionFinderTools.MaxDistVtxHit
            MaxdR=-10000.,  #-250.,
            #                                      MaxPhiVtxTrk     = 0.046   #0.2
            MaxPhiVtxTrk=0.05)
        ToolSvc += InDetConversionPostSelector
        print InDetConversionPostSelector

        # Single track conversion tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__SingleTrackConversionTool
        InDetSingleTrackConversion = InDet__SingleTrackConversionTool(
            name="InDetSingleTrackConversionTool" + name,
            ConversionFinderHelperTool=InDetConversionHelper,
            TrackSummaryTool=MyInDetTrackSummaryTool,
            Extrapolator=theAtlasExtrapolator,
            MaxBLayerHits=0,
            MinInitialHitRadius=70.,
            MinInitialHitRadius_noBlay=90.,
            MinRatioOfHLhits=0.95)
        ToolSvc += InDetSingleTrackConversion
        print InDetSingleTrackConversion
        ## Oct 5, following egamma
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools
        MyInDetConversionFinderTools = InDet__InDetConversionFinderTools(
            name="InDetConversionFinderTools" + name,
            VertexFitterTool=InDetConversionVxFitterTool,
            TrackSelectorTool=InDetConversionTrackSelector,
            TrackPairsSelector=InDetConversionTrackPairsSelector,
            ConversionFinderHelperTool=InDetConversionHelper,
            VertexPointEstimator=InDetConversionVtxPointEstimator,
            PostSelector=InDetConversionPostSelector,
            SingleTrackConversionTool=InDetSingleTrackConversion,
            Extrapolator=theAtlasExtrapolator,
            TrackParticleCollection="InDetTrackParticles",
            #                                                MinDistVtxHit              = -10000.,
            MinDistVtxHit=-350.,
            MaxDistVtxHit=230.,
            MinFlightAngle=0.0,
            MinInitVtxR=0.0,
            RemoveTrtTracks=False,
            IsConversion=True)
        ToolSvc += MyInDetConversionFinderTools
        print MyInDetConversionFinderTools

        from tauRecTools.tauRecToolsConf import PhotonConversionVertex
        photonConv = PhotonConversionVertex(
            name="PhotonConversionVertex",
            TauRecContainer="TauJets",
            TrackParticleContainer="InDetTrackParticles",
            OutputConversionVertexContainerName="ConversionsVertex_Container",
            MaxTauJetDr=0.5,
            ConversionFinderTool=MyInDetConversionFinderTools)

        return photonConv

    else:
        from tauRecTools.tauRecToolsConf import PhotonConversionPID
        photonConv = PhotonConversionPID(
            ConversionCandidatesName="ConversionCandidate",
            ConversionOutputName="ConversionsPID_Container",
            ElectronProbability=0.9)
        return photonConv
コード例 #2
0
    def __init__(self,
                 prefix="",
                 VertexCuts=None,
                 TrackParticles=None,
                 SecVertices=None,
                 Extrapolator=None,
                 TrackSummaryTool=None,
                 MagFieldSvc=None,
                 printConfig=False):

        # get ToolSvc and topSequence
        from AthenaCommon.AppMgr import ToolSvc
        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        # get InDetFlags
        from InDetRecExample.InDetJobProperties import InDetFlags

        #
        # --- load vertex fitter
        #
        from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
        InDetSecVxFitterTool = Trk__TrkVKalVrtFitter(
            name=prefix + "Fitter",
            Extrapolator=Extrapolator,
            IterationNumber=VertexCuts.Fitter_IterationNumber(),
            MakeExtendedVertex=VertexCuts.Fitter_MakeExtendedVertex(),
            FirstMeasuredPoint=VertexCuts.Fitter_FirstMeasuredPoint(),
            Robustness=VertexCuts.Fitter_Robustness(),
            InputParticleMasses=VertexCuts.Fitter_InputParticleMasses(),
            VertexForConstraint=VertexCuts.Fitter_VertexForConstraint(),
            CovVrtForConstraint=VertexCuts.Fitter_CovVrtForConstraint(),
            FirstMeasuredPointLimit=VertexCuts.FirstMeasuredPointLimit(),
            usePhiCnst=VertexCuts.usePhiCnst(),
            useThetaCnst=VertexCuts.useThetaCnst())
        ToolSvc += InDetSecVxFitterTool
        if (printConfig):
            print InDetSecVxFitterTool
        #
        # --- Distance of minimum approach utility
        #
        from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__SeedNewtonTrkDistanceFinder
        InDetSecVxTrkDistanceFinder = Trk__SeedNewtonTrkDistanceFinder(
            name=prefix + 'TrkDistanceFinder')
        ToolSvc += InDetSecVxTrkDistanceFinder
        if (printConfig):
            print InDetSecVxTrkDistanceFinder
        #
        # --- Helper Tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionFinderUtils
        InDetSecVxHelper = InDet__ConversionFinderUtils(name=prefix +
                                                        "FinderUtils")
        ToolSvc += InDetSecVxHelper
        if (printConfig):
            print InDetSecVxHelper
        #
        # --- Track selector tool
        #
        from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetConversionTrackSelectorTool
        InDetSecVxTrackSelector = InDet__InDetConversionTrackSelectorTool(
            name=prefix + "TrackSelector",
            TrackSummaryTool=TrackSummaryTool,
            Extrapolator=Extrapolator,
            maxSiD0=VertexCuts.TrkSel_maxSiD0(),
            maxTrtD0=VertexCuts.TrkSel_maxTrtD0(),
            maxSiZ0=VertexCuts.TrkSel_maxSiZ0(),
            maxTrtZ0=VertexCuts.TrkSel_maxTrtZ0(),
            minPt=VertexCuts.TrkSel_minPt(),
            RatioCut1=VertexCuts.TrkSel_RatioCut1(),
            RatioCut2=VertexCuts.TrkSel_RatioCut2(),
            RatioCut3=VertexCuts.TrkSel_RatioCut3(),
            RatioTRT=VertexCuts.TrkSel_RatioTRT(),
            IsConversion=VertexCuts.TrkSel_IsConversion(),
            significanceD0_Si=VertexCuts.TrkSel_significanceD0_Si(),
            RatioV0=VertexCuts.TrkSel_RatioV0())

        ToolSvc += InDetSecVxTrackSelector
        if (printConfig):
            print InDetSecVxTrackSelector
        #
        # Track pairs selector
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__TrackPairsSelector
        InDetSecVxTrackPairsSelector = InDet__TrackPairsSelector(
            name=prefix + "TrackPairsSelector",
            ConversionFinderHelperTool=InDetSecVxHelper,
            DistanceTool=InDetSecVxTrkDistanceFinder,
            MaxFirstHitRadius=VertexCuts.TrkPairSel_MaxFirstHitRadius(),
            MaxDistBetweenTracks=VertexCuts.TrkPairSel_MaxDistBetweenTracks(),
            MaxEta=VertexCuts.TrkPairSel_MaxEta(),
            MaxInitDistance=VertexCuts.TrkPairSel_MaxInitDistance(),
            MinTrackAngle=VertexCuts.TrkPairSel_MinTrackAngle())
        ToolSvc += InDetSecVxTrackPairsSelector
        if (printConfig):
            print InDetSecVxTrackPairsSelector
        #
        # Vertex point estimator
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
        InDetSecVtxPointEstimator = InDet__VertexPointEstimator(
            name=prefix + "PointEstimator",
            MinDeltaR=VertexCuts.VtxPt_MinDeltaR(),
            MaxDeltaR=VertexCuts.VtxPt_MaxDeltaR(),
            MaxPhi=VertexCuts.VtxPt_MaxPhi())
        ToolSvc += InDetSecVtxPointEstimator
        if (printConfig):
            print InDetSecVtxPointEstimator
        #
        # Secondary Vertex post selector
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionPostSelector
        InDetSecVtxPostSelector = InDet__ConversionPostSelector(
            name=prefix + "PostSelector",
            MaxChi2Vtx=VertexCuts.SecVtxPost_MaxChi2Vtx(),
            MaxInvariantMass=VertexCuts.SecVtxPost_MaxInvariantMass(),
            MinFitMomentum=VertexCuts.SecVtxPost_MinFitMomentum(),
            MinRadius=VertexCuts.SecVtxPost_MinRadius(),
            MinPt=VertexCuts.SecVtxPost_MinPt(),
            MaxdR=VertexCuts.SecVtxPost_MaxdR(),
            MaxPhiVtxTrk=VertexCuts.SecVtxPost_MaxPhiVtxTrk())
        ToolSvc += InDetSecVtxPostSelector
        if (printConfig):
            print InDetSecVtxPostSelector
        #
        # Single track secondary vertex tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__SingleTrackConversionTool
        InDetSingleTrackSecVtx = InDet__SingleTrackConversionTool(
            name=prefix + "SingleTrackTool",
            ConversionFinderHelperTool=InDetSecVxHelper,
            TrackSummaryTool=TrackSummaryTool,
            Extrapolator=Extrapolator,
            MaxBLayerHits=VertexCuts.SingleTrk_MaxBLayerHits(),
            MinInitialHitRadius=VertexCuts.SingleTrk_MinInitialHitRadius(),
            MinInitialHitRadius_noBlay=VertexCuts.
            SingleTrk_MinInitialHitRadius_noBlay(),
            MinRatioOfHLhits=VertexCuts.SingleTrk_MinRatioOfHLhits())
        ToolSvc += InDetSingleTrackSecVtx
        if (printConfig):
            print InDetSingleTrackSecVtx
        #
        # conversion finder tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools
        InDetSecVtxFinderTool = InDet__InDetConversionFinderTools(
            name=prefix + "FinderTool",
            VertexFitterTool=InDetSecVxFitterTool,
            TrackSelectorTool=InDetSecVxTrackSelector,
            TrackPairsSelector=InDetSecVxTrackPairsSelector,
            ConversionFinderHelperTool=InDetSecVxHelper,
            VertexPointEstimator=InDetSecVtxPointEstimator,
            PostSelector=InDetSecVtxPostSelector,
            SingleTrackConversionTool=InDetSingleTrackSecVtx,
            Extrapolator=Extrapolator,
            TrackParticleCollection=TrackParticles,
            RemoveTrtTracks=VertexCuts.Finder_RemoveTrtTracks(),
            IsConversion=VertexCuts.Finder_IsConversion(),
            MinDistVtxHit=VertexCuts.Finder_MinDistVtxHit(),
            MaxDistVtxHit=VertexCuts.Finder_MaxDistVtxHit(),
            MinFlightAngle=VertexCuts.Finder_MinFlightAngle(),
            MinInitVtxR=VertexCuts.Finder_MinInitVtxR())
        ToolSvc += InDetSecVtxFinderTool
        if (printConfig):
            print InDetSecVtxFinderTool

        # --- remember instances
        self.__prefix = prefix
        self.__InDetSecVtxFinderTool = InDetSecVtxFinderTool
        self.__TrackParticles = TrackParticles
        self.__SecVertices = SecVertices
        self.__printConfig = printConfig
        self.__topSequence = topSequence
コード例 #3
0
#                                                                       maxTrtZ0         = 10000.,
#                                                                       minPt            = 500.0,
#                                                                       RatioCut1        = 0.,  #0.5,
#                                                                       RatioCut2        = 0.,  #0.1,
#                                                                       RatioCut3        = 0.)  #0.05)

ToolSvc += InDetConversionTrackSelector
print InDetConversionTrackSelector

# Track pairs selector
#
from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__TrackPairsSelector
InDetConversionTrackPairsSelector = InDet__TrackPairsSelector(
    name="ConversionTrackPairsSelector",
    ConversionFinderHelperTool=InDetConversionHelper,
    DistanceTool=InDetConversionTrkDistanceFinder,
    MaxFirstHitRadius=500.,
    MaxDistBetweenTracks=[10., 50., 50.],  #[6.,90.,30.],
    MaxEta=[.3, .5, .5])  #[0.5,0.9,0.4],
#                                                              MaxInitDistance            = [350.,640.,80.])

ToolSvc += InDetConversionTrackPairsSelector
print InDetConversionTrackPairsSelector

# Vertex point estimator
#
from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
InDetConversionVtxPointEstimator = InDet__VertexPointEstimator(
    name="ConversionVtxPointEstimator",
    #                                                               MaxTrkXYDiffAtVtx      = [6.,8.,2.],
    #                                                               MaxTrkZDiffAtVtx       = [80.,380.,80.],
コード例 #4
0
    def __init__(self,
                 name="InDetTrigConversionFinder_Electron_EFID",
                 type="electron"):
        super(InDet__TrigConversionFinder, self).__init__(name)

        from AthenaCommon.AppMgr import ToolSvc
        from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
        from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import \
            InDetTrigExtrapolator, InDetTrigTrackSummaryTool

        #
        from TrkVKalVrtFitter.TrkVKalVrtFitterConf import Trk__TrkVKalVrtFitter
        InDetTrigConversionVxFitterTool = Trk__TrkVKalVrtFitter(
            name="InDetTrigConversionVxFitter",
            Extrapolator=InDetTrigExtrapolator,
            IterationNumber=30,
            MakeExtendedVertex=True,
            FirstMeasuredPoint=True,
            #                                                              MagFieldSvc         = InDetTrigMagField,
            Robustness=6,
            usePhiCnst=True,
            useThetaCnst=True,
            InputParticleMasses=[0.511, 0.511],
            VertexForConstraint=[0., 0., 0.],
            CovVrtForConstraint=[
                0.015 * 0.015, 0., 0.015 * 0.015, 0., 0., 10000. * 10000.
            ])
        ToolSvc += InDetTrigConversionVxFitterTool
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionVxFitterTool

        # Distance of minimum approach utility
        #
        from TrkVertexSeedFinderUtils.TrkVertexSeedFinderUtilsConf import Trk__SeedNewtonTrkDistanceFinder
        InDetTrigConversionTrkDistanceFinder = Trk__SeedNewtonTrkDistanceFinder(
            name='InDetTrigConversionTrkDistanceFinder')

        ToolSvc += InDetTrigConversionTrkDistanceFinder
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionTrkDistanceFinder

        # Helper Tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionFinderUtils
        InDetTrigConversionHelper = InDet__ConversionFinderUtils(
            name="InDetTrigConversionFinderUtils",
            #OutputLevel                = 1
        )

        ToolSvc += InDetTrigConversionHelper
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionHelper

        # Track selector tool
        #
        from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetConversionTrackSelectorTool
        InDetTrigConversionTrackSelector = InDet__InDetConversionTrackSelectorTool(
            name="InDetTrigConversionTrackSelector",
            TrackSummaryTool=InDetTrigTrackSummaryTool,
            Extrapolator=InDetTrigExtrapolator,
            maxSiD0=10000.,  #50.0,
            maxTrtD0=10000.,  #100.,
            maxSiZ0=10000.,  #350.0,
            maxTrtZ0=10000.,  #1400.,
            minPt=InDetTrigSliceSettings[('pTmin', type)],
            RatioCut1=0.0,  #0.5,
            RatioCut2=0.1,
            RatioCut3=0.1)

        ToolSvc += InDetTrigConversionTrackSelector
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionTrackSelector

        # Track pairs selector
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__TrackPairsSelector
        InDetTrigConversionTrackPairsSelector = InDet__TrackPairsSelector(
            name="InDetTrigConversionTrackPairsSelector",
            ConversionFinderHelperTool=InDetTrigConversionHelper,
            DistanceTool=InDetTrigConversionTrkDistanceFinder,
            MaxFirstHitRadius=500.,
            #OutputLevel                = 1,
            MaxDistBetweenTracks=[10., 50., 50.],  #[6.,80.,30.],
            MaxEta=[0.3, 0.5, 0.5]  #[0.5,1.0,0.5]
        )
        ToolSvc += InDetTrigConversionTrackPairsSelector
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionTrackPairsSelector

        # Vertex point estimator
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__VertexPointEstimator
        InDetTrigConversionVtxPointEstimator = InDet__VertexPointEstimator(
            name="InDetTrigConversionVtxPointEstimator",
            MinDeltaR=[-5., -25., -50.],
            MaxDeltaR=[5., 10., 10.],
            MaxPhi=[0.05, 0.5, 0.5])  #[0.05, 0.1, 0.1])

        ToolSvc += InDetTrigConversionVtxPointEstimator
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionVtxPointEstimator

        # Conversion post selector
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__ConversionPostSelector
        InDetTrigConversionPostSelector = InDet__ConversionPostSelector(
            name="InDetTrigConversionPostSelector",
            MaxChi2Vtx=[50., 50., 50.],  #[40.,100.,80.],
            MaxInvariantMass=[10000., 10000., 10000.],  #[60.,60.,30.],
            MinFitMomentum=[0., 0., 0.],  #[2000.,2000.,2000.],
            MinRadius=[-10000., -10000., -10000.],  #[30.,35.,250.],
            MinPt=0.,
            MaxdR=-10000.,  #-250.,
            MaxPhiVtxTrk=10000.)  #0.2)

        ToolSvc += InDetTrigConversionPostSelector
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionPostSelector

        # Single track conversion tool
        #
        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__SingleTrackConversionTool
        InDetTrigSingleTrackConversion = InDet__SingleTrackConversionTool(
            name="InDetTrigSingleTrackConversionTool",
            ConversionFinderHelperTool=InDetTrigConversionHelper,
            TrackSummaryTool=InDetTrigTrackSummaryTool,
            Extrapolator=InDetTrigExtrapolator,
            MinInitialHitRadius=70.,
            MinRatioOfHLhits=0.95)
        ToolSvc += InDetTrigSingleTrackConversion
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigSingleTrackConversion

        from InDetConversionFinderTools.InDetConversionFinderToolsConf import InDet__InDetConversionFinderTools
        InDetTrigConversionFinderTools = InDet__InDetConversionFinderTools(
            name="InDetTrigConversionFinderTools",
            VertexFitterTool=InDetTrigConversionVxFitterTool,
            TrackSelectorTool=InDetTrigConversionTrackSelector,
            TrackPairsSelector=InDetTrigConversionTrackPairsSelector,
            ConversionFinderHelperTool=InDetTrigConversionHelper,
            VertexPointEstimator=InDetTrigConversionVtxPointEstimator,
            PostSelector=InDetTrigConversionPostSelector,
            SingleTrackConversionTool=InDetTrigSingleTrackConversion,
            Extrapolator=InDetTrigExtrapolator,
            RemoveTrtTracks=False,
            #OutputLevel                = 1,
            IsConversion=True)
        ToolSvc += InDetTrigConversionFinderTools
        if (InDetTrigFlags.doPrintConfigurables()):
            print InDetTrigConversionFinderTools

        self.VertexFinderTool = InDetTrigConversionFinderTools

        #monitoring
        from InDetTrigConversionFinder.InDetTrigConversionFinderMonitoring import InDetTrigConversionFinderValidationMonitor
        from InDetTrigConversionFinder.InDetTrigConversionFinderMonitoring import InDetTrigConversionFinderOnlineMonitor
        from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
        convtime = TrigTimeHistToolConfig("ConvVxTime")
        convtime.TimerHistLimits = [0, 200]
        self.AthenaMonTools = [
            InDetTrigConversionFinderValidationMonitor(),
            InDetTrigConversionFinderOnlineMonitor(), convtime
        ]