예제 #1
0
def getInDetTrackSelectorTool():
    _name = sPrefix + 'InDetTrackSelectorTool'  
    
    if _name in cached_instances:
        return cached_instances[_name]
    
    #Configures tau track selector tool (should eventually check whether an existing one is available)
    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTRTDriftCircleCut
    InDetTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(name = _name,
                                                                pTMin                = 1000.,
                                                                IPd0Max              = 2.,
                                                                IPz0Max              = 9999., 
                                                                useTrackSummaryInfo  = True,
                                                                nHitBLayer           = 0, 
                                                                nHitBLayerPlusPix    = 0,
                                                                nHitPix              = 2,  # PixelHits + PixelDeadSensors
                                                                nHitSct              = 0,  # SCTHits + SCTDeadSensors
                                                                nHitSi               = 7,  # PixelHits + SCTHits + PixelDeadSensors + SCTDeadSensors
                                                                nHitTrt              = 0,  # nTRTHits
                                                                useSharedHitInfo     = False,
                                                                useTrackQualityInfo  = True,
                                                                fitChi2OnNdfMax      = 99999,
                                                                TrackSummaryTool     = None,
                                                                Extrapolator         = getAtlasExtrapolator(),
                                                                TrtDCCutTool         = InDetTrigTRTDriftCircleCut)
                                                                
    from AthenaCommon.AppMgr import ToolSvc
    ToolSvc += InDetTrackSelectorTool
    
    cached_instances[_name] = InDetTrackSelectorTool
    return InDetTrackSelectorTool
def GetCachedTrackSelectorTool():
    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    from AthenaCommon.AppMgr import ToolSvc
    ToolSvc += InDet__InDetDetailedTrackSelectorTool(
        "MyDetailedTrackSelectorTool")

    ToolSvc.MyDetailedTrackSelectorTool.pTMin = 500  # MeV
    ToolSvc.MyDetailedTrackSelectorTool.etaMax = 2.5
    ToolSvc.MyDetailedTrackSelectorTool.nHitBLayer = 0
    ToolSvc.MyDetailedTrackSelectorTool.nHitPix = 1
    ToolSvc.MyDetailedTrackSelectorTool.nHitBLayerPlusPix = 0
    ToolSvc.MyDetailedTrackSelectorTool.nHitSct = 6
    ToolSvc.MyDetailedTrackSelectorTool.nHitSi = 7
    ToolSvc.MyDetailedTrackSelectorTool.nHitTrt = 0
    ToolSvc.MyDetailedTrackSelectorTool.IPd0Max = 1.5  # d0 cut
    ToolSvc.MyDetailedTrackSelectorTool.IPz0Max = 1.5  # z0*sin(theta) cut
    ToolSvc.MyDetailedTrackSelectorTool.z0Max = 200  # z0 cut
    ToolSvc.MyDetailedTrackSelectorTool.fitChi2OnNdfMax = 10000  #3
    ToolSvc.MyDetailedTrackSelectorTool.d0significanceMax = -1.
    ToolSvc.MyDetailedTrackSelectorTool.z0significanceMax = -1.
    ToolSvc.MyDetailedTrackSelectorTool.Extrapolator = ToolSvc.InDetExtrapolator

    ToolSvc.MyDetailedTrackSelectorTool.OutputLevel = 3

    from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
    atst = AtlasTrackSummaryTool()
    ToolSvc += atst
    ToolSvc.MyDetailedTrackSelectorTool.TrackSummaryTool = atst
    from JetSubStructure.JetSubStructureConf import JetSubStructure__CachedTrackSelectorTool
    ToolSvc += JetSubStructure__CachedTrackSelectorTool(
        "CachedTrackSelectorTool")
    ToolSvc.CachedTrackSelectorTool.TrackSelector = ToolSvc.MyDetailedTrackSelectorTool

    return ToolSvc.CachedTrackSelectorTool
예제 #3
0
def createTrackJets (seq):
    
    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    theEGammaTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
        name                 = "egammaTrackJetTrackSelectorTool",
        pTMin                = 300.,
        etaMax               = 9999.,
        nHitBLayer           = 0,
        nHitPix              = 0,
        nHitBLayerPlusPix    = 0,
        nHitSct              = 0,
        nHitSi               = 5,
        nHitTrt              = 0,
        IPd0Max              = 100.,  # d0 cut
        IPz0Max              = 100.,  # z0*sin(theta) cut
        z0Max                = 1000., # z0 cut
        fitChi2OnNdfMax      = 1000, 
        d0significanceMax    = -1.,
        z0significanceMax    = -1.,
        TrackSummaryTool     = None,
        OutputLevel          = 3)

    from AthenaCommon.AppMgr import ToolSvc
    ToolSvc += theEGammaTrackSelectorTool
        
    # JetFinder (Anti-Kt)
    import JetRec.JetFinderConfig as thebtagJetFinder
    theEGammaFastJetKt = thebtagJetFinder.getFastKt(jetalgname = "egammaTrackJetFinder",
                                                    radius     = 0.5,
                                                    algorithm  = 'anti-kt',
                                                    flipvalues = 2)
    ToolSvc += theEGammaFastJetKt
    
    # Setup clustering tool
    from JetRecTools.JetRecToolsConf import JetTrackZClusterTool
    egammaTrackZClusterTool = JetTrackZClusterTool(
        name                       = "egammaTrackZClusterTool",
        TrackJetMinMulti           = 2,
        TrackJetMinPt              = 2000.,
        UseVtxSeeding              = True,
        DeltaZRange                = 10000.0,
        TrackParticleContainerName = "TrackParticleCandidate",
        VxContainerName            = "VxPrimaryCandidate",
        TrackSelector              = theEGammaTrackSelectorTool,
        JetFinder                  = theEGammaFastJetKt,
        OutputLevel                = 3)
    
    egammaToolList  = [ egammaTrackZClusterTool,
                        JetSorterTool (SortOrder = 'ByEtDown') ]

    make_StandardJetGetter('AntiKt', 0.5, 'Track', seq,
                           outputCollectionName = 'AntiKtZ5TrackJets',
                           allTools = egammaToolList)

    return
def toolInDetImprovedJetFitterTrackSelectorTool(name,
                                                useBTagFlagsDefaults=True,
                                                **options):
    """Sets up a InDetImprovedJetFitterTrackSelectorTool tool and returns it.

    The following options have BTaggingFlags defaults:

    pTMin                               default: 500.0
    IPd0Max                             default: 7.0
    IPz0Max                             default: 10.0
    sigIPd0Max                          default: 0.35
    sigIPz0Max                          default: 2.5
    etaMax                              default: 9999.0
    useTrackSummaryInfo                 default: True
    nHitBLayer                          default: 0
    nHitPix                             default: 1
    nHitSct                             default: 4
    nHitSi                              default: 7
    nHitTrt                             default: 0
    useSharedHitInfo                    default: False
    useTrackQualityInfo                 default: True
    fitChi2OnNdfMax                     default: 3.5
    TrackSummaryTool                    default: None

    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 = {
            'pTMin': 500.0,
            'IPd0Max': 7.0,
            'IPz0Max': 10.0,
            'sigIPd0Max': 0.35,
            'sigIPz0Max': 2.5,
            'etaMax': 9999.0,
            'useTrackSummaryInfo': True,
            'nHitBLayer': 0,
            'nHitPix': 1,
            'nHitSct': 4,
            'nHitSi': 7,
            'nHitTrt': 0,
            'useSharedHitInfo': False,
            'useTrackQualityInfo': True,
            'fitChi2OnNdfMax': 3.5,
            'TrackSummaryTool': None
        }
        for option in defaults:
            options.setdefault(option, defaults[option])
    options['name'] = name
    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    return InDet__InDetDetailedTrackSelectorTool(**options)
예제 #5
0
ToolSvc += FillAlignTRTHits
print FillAlignTRTHits

ToolSvc.InDetTRT_DriftCircleTool.useDriftTimeToTCorrection = True
ToolSvc.InDetTRT_DriftCircleTool.useDriftTimeHTCorrection = True
print ToolSvc.InDetTRT_DriftCircleTool

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
TRTTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
    name="InDetDetailedTrackSelectorTool",
    pTMin=1000,
    fitChi2OnNdfMax=50.,
    z0Max=300,
    nHitBLayer=0,
    nHitPix=0,
    nHitBLayerPlusPix=0,
    nHitSct=0,
    nHitSi=4,
    nHitTrt=20,
    nHitTrtPlusOutliers=0,
    nHitTrtHighE=0,
    nHitTrtPlusOutliersHighE=0,
    nHitTrtHighEFractionMax=1,
    nHitTrtHighEFractionWithOutliersMax=1)

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

from TRT_CalibAlgs.TRT_CalibAlgsConf import TRTCalibrationMgr
CosmicsTRTCalibMgr = TRTCalibrationMgr(
    name='CosmicsTRTCalibMgr',
# ------ load new track selector (common for all vertexing algorithms, except for the moment VKalVrt)
#
from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
InDetTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(name = "InDetDetailedTrackSelectorTool",
                                                               pTMin                = 500,
                                                               IPd0Max              = 4,
                                                               IPz0Max              = 1000,
                                                               z0Max                = 1000,
                                                               sigIPd0Max           = 0.35,
                                                               sigIPz0Max           = 2.5,
                                                               d0significanceMax    = -1.,#problem is that you cannot use the significance at all!
                                                               z0significanceMax    = -1.,
                                                               etaMax               = 9999.,
                                                               useTrackSummaryInfo  = True,
                                                               nHitBLayer           = 0,
                                                               nHitPix              = 1,
                                                               nHitBLayerPlusPix    = 0,
                                                               nHitSct              = 5,
                                                               nHitSi               = 7,
                                                               nHitTrt              = 0,
                                                               nHitTrtHighEFractionMax = 1,
                                                               nHitTrtHighEFractionWithOutliersMax = 1,
                                                               useSharedHitInfo     = False,
                                                               useTrackQualityInfo  = True,
                                                               fitChi2OnNdfMax      = 3.5,
                                                               TrtMaxEtaAcceptance  = 1.9,
                                                               TrackSummaryTool     = InDetTrackSummaryTool,
                                                               Extrapolator         = InDetExtrapolator)
ToolSvc += InDetTrackSelectorTool

if InDetFlags.primaryVertexSetup() == 'DefaultFastFinding':
예제 #7
0
# for loosening the impact parameter cut d0Max in the InDetDetailedTrackSelectorTool
# and disabling the beam constraint. Note that tracking should be unbiased wrt the
# beamspot, and so we don't need to redo the standard tracking collection.
#
from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool

BeamSpotTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
    name="BeamSpotDetailedTrackSelectorTool",
    pTMin=500,
    IPd0Max=50,
    IPz0Max=1000,
    sigIPd0Max=0.35,
    sigIPz0Max=2.5,
    etaMax=9999.,
    useTrackSummaryInfo=True,
    nHitBLayer=0,
    nHitPix=1,
    nHitSct=5,
    nHitSi=7,
    nHitTrt=0,
    useSharedHitInfo=False,
    useTrackQualityInfo=True,
    fitChi2OnNdfMax=3.5,
    TrackSummaryTool=InDetTrackSummaryTool,
    Extrapolator=InDetExtrapolator)
ToolSvc += BeamSpotTrackSelectorTool

from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetAdaptiveMultiPriVxFinderTool

BeamSpotPriVxFinderTool = InDet__InDetAdaptiveMultiPriVxFinderTool(
    name="BeamSpotAdaptiveMultiPriVxFinderTool",
예제 #8
0
    m_alignMonTrackSelectionToolName = [
        "AlignTracksTrackSelectionTool", "CombinedTracksSelectionTool"
    ]

    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    for i in range(len(m_alignMonTrackSelectionToolName)):
        printfunc(" <NewInDetAlignMonitoring> step ", i,
                  " --> setting track SELECTOR:", m_trackSelectorToolName[i])
        m_alignMonTrackSelectorTool.append(
            InDet__InDetDetailedTrackSelectorTool(
                name=m_trackSelectorToolName[i],
                pTMin=1000,  #1 GeV
                IPd0Max=1000.0,  #no cut on d0 yet
                IPz0Max=1200.0,  #actual cut is on sin(theta)*z0
                nHitBLayer=m_nHitBLayer[i],
                nHitPix=m_nHitPix[i],
                nHitSct=m_nHitSct[i],
                nHitSi=m_nHitSi[i],
                nHitTrt=m_nHitTrt[i],
                nSharedSct=0,
                TrackSummaryTool=InDetTrackSummaryTool,
                Extrapolator=InDetExtrapolator))
        #ToolSvc += m_alignMonTrackSelectorTool[i]
        if (InDetFlags.doPrintConfigurables()):
            printfunc(m_alignMonTrackSelectorTool[i])

        m_alignMonTrackSelectionTool.append(
            InDetAlignMon__TrackSelectionTool(
                name=m_alignMonTrackSelectionToolName[i],
                ## Uncomment this line to bypass track slection
                #PassAllTracks      = True,
예제 #9
0
ToolSvc += ConfiguredForAllStationsTrackToSegmentTool
#print ConfiguredForAllStationsTrackToSegmentTool

#--------------------------------------------------------------------------------------------------------------------------
from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
TrkTrackSummaryToolFORMuTagIMOInDetDetailedTrackSelectorTool = AtlasTrackSummaryTool()
ToolSvc += TrkTrackSummaryToolFORMuTagIMOInDetDetailedTrackSelectorTool

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool

from AthenaCommon.BeamFlags import jobproperties
MuTagIMOInDetDetailedTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
      name                 = "MuTagIMOInDetDetailedTrackSelectorTool",
      pTMin                = 0*MeV,
      IPd0Max              = 9999.0*mm,
      IPz0Max              = 9999.0*mm,
      z0Max                = 9999.0*mm,
      useTrackSummaryInfo  = False,
      useTrackQualityInfo  = False,
      TrackSummaryTool = TrkTrackSummaryToolFORMuTagIMOInDetDetailedTrackSelectorTool,
      Extrapolator = MuTagExtrapolator)

ToolSvc +=MuTagIMOInDetDetailedTrackSelectorTool
#---#print MuTagIMOInDetDetailedTrackSelectorTool
#--------------------------------------------------------------------------------------------------------------------------

from MuTagTools.MuTagToolsConf import SegmentsFilterTool
ConfiguredForAllStationsSegmentsFilterTool = SegmentsFilterTool(
    name = "ConfiguredForAllStationsSegmentsFilterTool",
 RejectSegmentsAgainstCbMuonContainer             = 0                            ,
 SegmentShouldNotBeInTracksOfThisCbMuonContainer  = "NoContainer"                ,
 ApplyQualityFactorCut                            = 0                            ,
#MyKt6JetTrackZClusterTool = JetTrackZClusterTool( "MyKt6TrackJetTool" )
#MyKt6JetTrackZClusterTool.TrackJetMinMulti           = 2
#MyKt6JetTrackZClusterTool.TrackJetMinPt              = 1000 # MeV
#MyKt6JetTrackZClusterTool.UseVtxSeeding              = False
#MyKt6JetTrackZClusterTool.DeltaZRange                = 10.0
#MyKt6JetTrackZClusterTool.TrackParticleContainerName = "TrackParticleCandidate"
#MyKt6JetTrackZClusterTool.VxContainerName            = "VxPrimaryCandidate"
#MyKt6JetTrackZClusterTool.OutputLevel                = INFO

#--------------------------------------------------------------
# TrackSelector Tool Options
#--------------------------------------------------------------

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
ToolSvc += InDet__InDetDetailedTrackSelectorTool(
    "MyDetailedTrackSelectorTool",
    TrackSummaryTool=ToolSvc.InDetTrackSummaryTool,
    Extrapolator=ToolSvc.InDetExtrapolator)
#See InDetDetailedTrackSelectorTool.h for additional options and defaults
ToolSvc.MyDetailedTrackSelectorTool.pTMin = 500.
ToolSvc.MyDetailedTrackSelectorTool.etaMax = 2.5
ToolSvc.MyDetailedTrackSelectorTool.nHitBLayer = 0
ToolSvc.MyDetailedTrackSelectorTool.nHitPix = 0
ToolSvc.MyDetailedTrackSelectorTool.nHitBLayerPlusPix = 1
ToolSvc.MyDetailedTrackSelectorTool.nHitSct = 6
ToolSvc.MyDetailedTrackSelectorTool.nHitSi = 7
ToolSvc.MyDetailedTrackSelectorTool.nHitTrt = 0
ToolSvc.MyDetailedTrackSelectorTool.IPd0Max = 1.5
ToolSvc.MyDetailedTrackSelectorTool.IPz0Max = 1.5
ToolSvc.MyDetailedTrackSelectorTool.z0Max = 200.
ToolSvc.MyDetailedTrackSelectorTool.fitChi2OnNdfMax = 10000
ToolSvc.MyDetailedTrackSelectorTool.d0significanceMax = -1.
예제 #11
0
def createJSTrackJets(theseq, myjetfinder, myjetdr):

    # Setup tool so that it can be used
    JS_MyJetTrackZClusterTool = JetTrackZClusterTool(
        "JS_JetTrackZClusterTool_%s%d" % (myjetfinder, myjetdr * 10))

    JS_MyJetTrackZClusterTool.TrackJetMinMulti = 2
    JS_MyJetTrackZClusterTool.TrackJetMinPt = 4000  # MeV
    JS_MyJetTrackZClusterTool.UseVtxSeeding = True
    JS_MyJetTrackZClusterTool.DeltaZRange = 10000.0
    JS_MyJetTrackZClusterTool.TrackParticleContainerName = "TrackParticleCandidate"
    JS_MyJetTrackZClusterTool.VxContainerName = "VxPrimaryCandidate"
    JS_MyJetTrackZClusterTool.OutputLevel = 3

    #--------------------------------------------------------------
    # TrackSelector Tool Options
    #--------------------------------------------------------------

    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    from AthenaCommon.AppMgr import ToolSvc
    trackSelector = InDet__InDetDetailedTrackSelectorTool(
        "JS_MyDetailedTrackSelectorTool")
    ToolSvc += trackSelector

    #See InDetDetailedTrackSelectorTool.h for additional options and defaults

    trackSelector.pTMin = 500  # MeV
    trackSelector.etaMax = 2.5
    trackSelector.nHitBLayer = 0
    trackSelector.nHitPix = 0
    trackSelector.nHitBLayerPlusPix = 1  #0
    trackSelector.nHitSct = 6  #0
    trackSelector.nHitSi = 7  #7
    trackSelector.nHitTrt = 0
    trackSelector.IPd0Max = 1.0  #1 # d0 cut
    trackSelector.IPz0Max = 1.5  # z0*sin(theta) cut
    trackSelector.z0Max = 200  # z0 cut
    trackSelector.fitChi2OnNdfMax = 10000  #1000  #3.5 #3
    trackSelector.d0significanceMax = -1.
    trackSelector.z0significanceMax = -1.

    # Try to set InDet default tools to avoid strange bugs
    try:
        trackSelector.Extrapolator = ToolSvc.InDetExtrapolator
    except:
        from AthenaCommon.Logging import logging
        l = logging.getLogger("TrackSelectionForJets::setupTrackSelectorTool")
        l.warning(
            "No ToolSvc.InDetExtrapolator available. Tracking might cause infinite loop"
        )
        pass

    #trackSelector.OutputLevel = 3

    from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
    atst = AtlasTrackSummaryTool()
    ToolSvc += atst
    trackSelector.TrackSummaryTool = atst

    ##
    from JetSubStructure.JetSubStructureConf import JetSubStructure__CachedTrackSelectorTool
    CachedTrackSelector = JetSubStructure__CachedTrackSelectorTool(
        "JS_CachedTrackSelectorTool")
    ToolSvc += CachedTrackSelector

    CachedTrackSelector.TrackSelector = trackSelector

    ##
    # Tell "JetTrackZClusterTool" to use this tool
    JS_MyJetTrackZClusterTool.TrackSelector = CachedTrackSelector.TrackSelector

    #--------------------------------------------------------------
    # JetFinder Tool Options (Anti-Kt)
    #--------------------------------------------------------------

    from JetRec.JetRecConf import JetFastJetFinderTool
    myfastfinder = JetFastJetFinderTool("JS_%s%dTrackJetFinder" %
                                        (myjetfinder, myjetdr * 10))

    if myjetfinder == 'AntiKt':
        myfastfinder.Algorithm = "anti-kt"
    elif myjetfinder == 'CamKt':
        myfastfinder.Algorithm = "cambridge"

    myfastfinder.Radius = myjetdr
    myfastfinder.RecombScheme = "E"
    myfastfinder.Strategy = "Best"
    myfastfinder.FailIfMisconfigured = True
    myfastfinder.Inclusive = True
    myfastfinder.CalculateJetArea = False
    myfastfinder.StoreNFlipValues = 0

    ToolSvc += myfastfinder

    # Tell "TrackZClusterTool" to use this tool
    JS_MyJetTrackZClusterTool.JetFinder = myfastfinder

    #-------------------------------------------------------------
    # Jet Getter
    #-------------------------------------------------------------

    JS_TrackZToolList = [
        JS_MyJetTrackZClusterTool,
        JetSignalSelectorTool('JSTZ_JetFinalPtCut',
                              UseTransverseMomentum=True,
                              MinimumSignal=jetFlags.finalMinEt()),
        JetSorterTool('JSTZ_JetSorter', SortOrder="ByPtDown")
    ]

    mytrackzjetgetter = make_StandardJetGetter(myjetfinder,
                                               myjetdr,
                                               'TrackZ',
                                               seq=theseq,
                                               allTools=JS_TrackZToolList)

    return mytrackzjetgetter
예제 #12
0
from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
InDetTrackSelectorTool_Pix = InDet__InDetDetailedTrackSelectorTool(
    name="InDetDetailedTrackSelectorTool_Pix",
    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=InDetPrimaryVertexingCuts.nHitBLayer(),
    nHitPix=InDetPrimaryVertexingCuts.nHitPix(),
    nHitBLayerPlusPix=InDetPrimaryVertexingCuts.nHitBLayerPlusPix(),
    nHitSct=0,
    nHitSi=0,
    nHitTrt=0,
    nHitTrtHighEFractionMax=InDetPrimaryVertexingCuts.nHitTrtHighEFractionMax(
    ),
    nHitTrtHighEFractionWithOutliersMax=InDetPrimaryVertexingCuts.
    nHitTrtHighEFractionWithOutliersMax(),
    useSharedHitInfo=InDetPrimaryVertexingCuts.useSharedHitInfo(),
    useTrackQualityInfo=InDetPrimaryVertexingCuts.useTrackQualityInfo(),
    fitChi2OnNdfMax=InDetPrimaryVertexingCuts.fitChi2OnNdfMax(),
    TrtMaxEtaAcceptance=InDetPrimaryVertexingCuts.TrtMaxEtaAcceptance(),
    TrackSummaryTool=InDetTrackSummaryTool,
    Extrapolator=InDetExtrapolator)

ToolSvc += InDetTrackSelectorTool_Pix
예제 #13
0
     UseActiveFractionSvc=False)
 ToolSvc += trtDCtool
 print trtDCtool
 if not newInDetAlignAlg_Options["Cosmics"]:
     ## Matthias: Reduce requirements for DBM, might need further adjustments
     from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
     trackSelector = InDet__InDetDetailedTrackSelectorTool(
         name="TrackSelector",
         OutputLevel=newInDetAlignAlg_Options["outputLevel"],
         #OutputLevel = DEBUG,
         TrackSummaryTool="InDetTrackSummaryTool",
         pTMin=newInDetAlignAlg_Options["PtCut"],
         IPd0Max=5000.,
         IPz0Max=5000.,
         #nHitSct = 4,
         nHitPix=1,
         nHitPixPhysical=1,
         nHitBLayerPlusPix=0,
         nHitBLayer=0,
         nHitSi=3,
         nHitSiPhysical=3,
         nHitTrt=0,
         #useEtaDepententMinHitTrt = True,
         TrtDCCutTool=trtDCtool,
         addToMinHitTrt=-3)
     if newInDetAlignAlg_Options["useTRT"]:
         trackSelector.useEtaDepententMinHitTrt = True
 else:
     from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetCosmicTrackSelectorTool
     trackSelector = InDet__InDetCosmicTrackSelectorTool(
         name="TrackSelector",
    AtlasExtrapolator = AtlasExtrapolator()
    ToolSvc += AtlasExtrapolator
    if BTaggingFlags.OutputLevel < 3:
        print AtlasExtrapolator
    from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
    TrackJetTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
        name="TrackJetTrackSelectorTool",
        pTMin=0.,
        IPd0Max=9999.,
        d0MaxPreselection=9999.,
        IPz0Max=10.,  #only cut here : require a track not too far from PVX in z
        sigIPd0Max=9999.,
        sigIPz0Max=9999.,
        etaMax=9999.,
        useTrackSummaryInfo=False,
        nHitBLayer=0,
        nHitPix=0,
        nHitSct=0,
        nHitSi=0,
        nHitTrt=0,
        nHitTrtHighE=0,
        useSharedHitInfo=False,
        useTrackQualityInfo=False,
        fitChi2OnNdfMax=9999,
        TrackSummaryTool=None,
        Extrapolator=AtlasExtrapolator)

    ToolSvc += TrackJetTrackSelectorTool
    if BTaggingFlags.OutputLevel < 3:
        print TrackJetTrackSelectorTool
else:
예제 #15
0
from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
EMTrackIsolationTrackSummaryTool = AtlasTrackSummaryTool()
ToolSvc += EMTrackIsolationTrackSummaryTool

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
OuterTrackIsolationTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
    name="OuterTrackIsolationTrackSelectorTool",
    pTMin=1000.,
    IPd0Max=1. * mm,
    IPz0Max=9999.,
    nHitBLayer=1,
    nHitPix=0,
    nHitSct=0,
    nHitSi=7,
    #TrtMaxEtaAcceptance  = 0, #don't check nb TRT hits
    nHitTrt=0,
    #nSharedBLayer        = 999,
    #nSharedPix           = 999,
    #nSharedSct           = 999,
    #nSharedSi            = 999,
    useTrackQualityInfo=False,
    #d0MaxPreselection    = 9999.,
    TrackSummaryTool=EMTrackIsolationTrackSummaryTool,
    Extrapolator=EMTrackIsolationExtrapolator,
    OutputLevel=WARNING)
ToolSvc += OuterTrackIsolationTrackSelectorTool
OuterTrackIsolationTrackSelectorTool.OutputLevel = INFO

InnerTrackIsolationTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
    name="InnerTrackIsolationTrackSelectorTool",
    pTMin=1000.,
  
  ToolSvc += JetFitterExtrapolator
  if BTaggingFlags.OutputLevel < 3:
    print JetFitterExtrapolator
    
  # Track Selector for JetFitter
  from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
  NewInDetJetFitterTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(name = "InDetImprovedJetFitterTrackSelectorTool",
                                                                             pTMin = 500.,
                                                                             IPd0Max = 7.,
                                                                             IPz0Max = 10.,
                                                                             sigIPd0Max = 0.35,
                                                                             sigIPz0Max = 2.5,
                                                                             etaMax = 9999.,
                                                                             useTrackSummaryInfo = True,
                                                                             nHitBLayer = 0,
                                                                             nHitPix = 1,
                                                                             nHitSct = 4,
                                                                             nHitSi = 7,
                                                                             nHitTrt = 0,
                                                                             useSharedHitInfo = False,
                                                                             useTrackQualityInfo = True,
                                                                             fitChi2OnNdfMax = 3.5,
                                                                             TrackSummaryTool = None,
                                                                             Extrapolator = JetFitterExtrapolator)
  
  ToolSvc += NewInDetJetFitterTrackSelectorTool
  if BTaggingFlags.OutputLevel < 3:
    print NewInDetJetFitterTrackSelectorTool    
      
  #LOAD CONVENTIONAL VERTEXING TOOLS
예제 #17
0
    def __init__(self, name="TrigTauRecCosmics_Tau2012"):
        super(TrigTauRecCosmics_Tau2012, self).__init__(name)
        self.trkcone = 9999.0
        from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
        trigTauCosmicsTrackSelectTool = InDet__InDetDetailedTrackSelectorTool(
            "TrigTau2012CosmicsTrackSelect")

        trigTauCosmicsTrackSelectTool.pTMin = 1000.
        trigTauCosmicsTrackSelectTool.IPd0Max = 9999.0
        trigTauCosmicsTrackSelectTool.d0MaxPreselection = 9999.0
        trigTauCosmicsTrackSelectTool.IPz0Max = 9999.
        trigTauCosmicsTrackSelectTool.useTrackSummaryInfo = True
        trigTauCosmicsTrackSelectTool.nHitBLayer = 0
        trigTauCosmicsTrackSelectTool.nHitPix = 0
        trigTauCosmicsTrackSelectTool.nHitSct = 0
        trigTauCosmicsTrackSelectTool.nHitSi = 0
        trigTauCosmicsTrackSelectTool.nHitTrt = 0
        trigTauCosmicsTrackSelectTool.nHitTrtPlusOutliers = 0
        trigTauCosmicsTrackSelectTool.TrtMaxEtaAcceptance = 1.9
        trigTauCosmicsTrackSelectTool.useSharedHitInfo = False
        trigTauCosmicsTrackSelectTool.useTrackQualityInfo = True
        trigTauCosmicsTrackSelectTool.fitChi2OnNdfMax = 9999.0
        trigTauCosmicsTrackSelectTool.TrackSummaryTool = None

        trigTauCosmicsTrackSelectTool.Extrapolator = TauSelectExtrapolator

        from AthenaCommon.AppMgr import ToolSvc
        ToolSvc += trigTauCosmicsTrackSelectTool

        self.Tools[
            'TrigTau_TauTrackFinder'].TrackSelectorToolTau = trigTauCosmicsTrackSelectTool
        self.Tools[
            'TrigTau_TauTrackFinder'].MaxJetDrTau = 9999.0  # CoreTrackDist
        self.Tools[
            'TrigTau_TauTrackFinder'].MaxJetDrWide = 9999.0  # WideTrackDist
        self.Tools[
            'TrigTau_TauTrackFinder'].removeTracksOutsideZ0wrtLeadTrk = False
예제 #18
0
print InDetTrackSummaryTool

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
InDetTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
    name="cascade_InDetDetailedTrackSelectorTool",
    pTMin=400.0,
    IPd0Max=10000.0,
    IPz0Max=10000.0,
    z0Max=10000.0,
    sigIPd0Max=10000.0,
    sigIPz0Max=10000.0,
    d0significanceMax=-1.,
    z0significanceMax=-1.,
    etaMax=9999.,
    useTrackSummaryInfo=True,
    nHitBLayer=0,
    nHitPix=1,
    nHitBLayerPlusPix=1,
    nHitSct=2,
    nHitSi=3,
    nHitTrt=0,
    nHitTrtHighEFractionMax=10000.0,
    useSharedHitInfo=False,
    useTrackQualityInfo=True,
    fitChi2OnNdfMax=10000.0,
    TrtMaxEtaAcceptance=1.9,
    TrackSummaryTool=InDetTrackSummaryTool,
    Extrapolator=InDetExtrapolator)

ToolSvc += InDetTrackSelectorTool
print InDetTrackSelectorTool
예제 #19
0
def trackIsolationTool(name,
                       doTrackIsolation=False,
                       doSumConversionTracks=True,
                       trackParticleCollection='TrackParticleCandidate',
                       conversionContainer='ConversionCandidate',
                       calorimeterCellContainer=None,
                       onlyEM=False,
                       coreDeltaR=0.05,
                       trackToVertexTool=None,
                       trackSummaryTool=None,
                       extrapolator=None,
                       trackSelector=None,
                       pTMin=1000 * MeV,
                       IPd0Max=10.0 * mm,
                       IPz0Max=10.0 * mm,
                       z0Max=10.0 * mm,
                       useTrackSummaryInfo=True,
                       nHitBLayer=0,
                       nHitPix=0,
                       nHitBLayerPlusPix=0,
                       nHitSct=0,
                       nHitSi=4,
                       nHitTrt=0,
                       useTrackQualityInfo=False,
                       **kw):

    from AthenaCommon.AppMgr import ToolSvc

    if calorimeterCellContainer == None:
        calorimeterCellContainer = \
          'AODCellContainer' if rec.readAOD() else 'AllCalo'

    if trackToVertexTool == None:
        from TrackToVertex.TrackToVertexConf import Reco__TrackToVertex
        trackToVertexTool = Reco__TrackToVertex()
        ToolSvc += trackToVertexTool

    if trackSummaryTool == None:
        from TrkTrackSummaryTool.AtlasTrackSummaryTool import AtlasTrackSummaryTool
        trackSummaryTool = AtlasTrackSummaryTool()
        ToolSvc += trackSummaryTool

    if extrapolator == None:
        from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
        extrapolator = AtlasExtrapolator()
        ToolSvc += extrapolator

    if trackSelector == None:
        selname = name + 'TrackSelector'
        from AthenaCommon.BeamFlags import jobproperties
        if (jobproperties.Beam.beamType() == 'cosmics'
                or jobproperties.Beam.beamType() == 'singlebeam'):

            trackSelector = InDet__InDetDetailedTrackSelectorTool(
                name=selname,
                pTMin=0 * MeV,
                IPd0Max=9999 * mm,
                IPz0Max=9999 * mm,
                z0Max=9999 * mm,
                useTrackSummaryInfo=False,
                useTrackQualityInfo=False,
                TrackSummaryTool=trackSummaryTool,
                Extrapolator=extrapolator)
        else:
            trackSelector = InDet__InDetDetailedTrackSelectorTool(
                name=selname,
                pTMin=pTMin,
                IPd0Max=IPd0Max,
                IPz0Max=IPz0Max,
                z0Max=z0Max,
                useTrackSummaryInfo=useTrackSummaryInfo,
                nHitBLayer=nHitBLayer,
                nHitPix=nHitPix,
                nHitBLayerPlusPix=nHitBLayerPlusPix,
                nHitSct=nHitSct,
                nHitSi=nHitSi,
                nHitTrt=nHitTrt,
                useTrackQualityInfo=useTrackQualityInfo,
                TrackSummaryTool=trackSummaryTool,
                Extrapolator=extrapolator,
                **kw)
        ToolSvc += trackSelector

    tool = TrackIsolationTool(name,
                              DoTrackIsolation=doTrackIsolation,
                              DoSumConversionTracks=doSumConversionTracks,
                              TrackParticleCollection=trackParticleCollection,
                              ConversionContainer=conversionContainer,
                              CaloCellContainer=calorimeterCellContainer,
                              OnlyEM=onlyEM,
                              CoreDeltaR=coreDeltaR,
                              ExtrapolTrackToCaloTool=ToolSvc.TrackInCaloTools,
                              TrackToVertex=trackToVertexTool,
                              TrackSelector=trackSelector)
    ToolSvc += tool
    return tool
예제 #20
0
TrkTrackSummaryToolFORMuTagIMOInDetDetailedTrackSelectorTool = AtlasTrackSummaryTool()
ToolSvc += TrkTrackSummaryToolFORMuTagIMOInDetDetailedTrackSelectorTool

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool

from AthenaCommon.GlobalFlags import globalflags
from RecExConfig.RecFlags import rec

MuTagIMOInDetDetailedTrackSelectorTool = InDet__InDetDetailedTrackSelectorTool(
      name                 = "MuTagIMOInDetDetailedTrackSelectorTool",
      pTMin                = 2000*MeV,
      IPd0Max              = 50.0*mm,
      IPz0Max              = 9999.0*mm,
      z0Max                = 9999.0*mm,
      useTrackSummaryInfo  = False,
      nHitBLayer           = 0,
      nHitPix              = 1,
      nHitBLayerPlusPix    = 0,
      nHitSct              = 3,
      nHitSi               = 4,
      nHitTrt              = 0,
      useTrackQualityInfo  = False,
      TrackSummaryTool = TrkTrackSummaryToolFORMuTagIMOInDetDetailedTrackSelectorTool,
      Extrapolator = MuTagExtrapolator)

ToolSvc +=MuTagIMOInDetDetailedTrackSelectorTool
#---#print MuTagIMOInDetDetailedTrackSelectorTool
#--------------------------------------------------------------------------------------------------------------------------

#if rec.Commissioning == True :
#  ToolSvc.MuTagIMOInDetDetailedTrackSelectorTool.useTrackSummaryInfo = False
예제 #21
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)
예제 #22
0
#from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
InDetTrackSummaryTool = ToolSvc.InDetTrackSummaryTool
#import egammaRec.EMCommonTrackSummary
#InDetTrackSummaryTool = ToolSvc.InDetTrackSummaryTool #egammaRec.EMCommonTrackSummary.egammaInDetTrackSummaryTool

from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
trackSelector = InDet__InDetDetailedTrackSelectorTool(
    name="TrackSelector",
    OutputLevel=7,
    #OutputLevel = DEBUG,
    TrackSummaryTool=InDetTrackSummaryTool,
    pTMin=10000.,
    IPd0Max=500.,
    IPz0Max=500.,
    #nHitSct = 4,
    nHitPix=1,
    nHitPixPhysical=1,
    nHitBLayerPlusPix=0,
    nHitBLayer=0,
    nHitSi=9,
    nHitSiPhysical=7,
    nHitTrt=0,
    #useEtaDepententMinHitTrt = True,
    TrtDCCutTool=trtDCtool,
    #    addToMinHitTrt = -3
)
trackSelector.useEtaDepententMinHitTrt = True
ToolSvc += trackSelector

alignTrackSelection = InDetAlignMon__TrackSelectionTool(
    name="InDetAlignMonAlignTrackSelectionTool",
    #PassAllTracks = True, ## Uncomment this line to bypass track slection
예제 #23
0
    if len(TrackCollectionKeys) > 0:
        if not (InDetFlags.doDBMstandalone() or InDetFlags.doDBM()):
            #
            # -- track selections
            #
            # for standard good quality cuts
            from InDetTrackSelectorTool.InDetTrackSelectorToolConf import InDet__InDetDetailedTrackSelectorTool
            InDetTrackSelectorToolGood = InDet__InDetDetailedTrackSelectorTool(
                name="InDetDetailedTrackSelectorToolGood",
                pTMin=0,
                d0MaxPreselection=10,
                IPd0Max=2,
                IPz0Max=10000,
                etaMax=2.5,
                nHitSi=7,
                nHitBLayer=0,
                nHitPix=0,
                nHitTrtHighEFractionMax=1,
                nHitTrtHighEFractionWithOutliersMax=1,
                useTrackSummaryInfo=True,
                InDetTestBLayerTool=InDetRecTestBLayerTool,
                TrackSummaryTool=InDetTrackSummaryTool,
                Extrapolator=InDetExtrapolator,
                TrtMaxEtaAcceptance=1.9)

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

        # for track selection as done by b-tagging group
            InDetTrackSelectorToolBtag = InDet__InDetDetailedTrackSelectorTool(