Пример #1
0
 def algorithm(self):
     from Configurables import TrackListRefiner
     refiner = TrackListRefiner(self.name() + "SelectorAlg",
                                inputLocation=self.inputLocation(),
                                outputLocation=self.location())
     self.configureSelector(refiner)
     return refiner
Пример #2
0
def ConfiguredGoodTrackFilter (name,
                               InputLocation,
                               OutputLocation = None):
    if name == None:
        log.fatal( '##################################################################################')
        log.fatal( '## FATAL You did not specify the name of the Filter instance.' )
        log.fatal( '## FATAL I will now die, you need to make Hlt2Tracking aware of the name!  ')
        log.fatal( '##################################################################################')
    if OutputLocation == None: OutputLocation = InputLocation + "Filtered"
    from Configurables import TrackListRefiner
    filterTracks = TrackListRefiner( name,
                                     inputLocation = InputLocation,
                                     outputLocation = OutputLocation)
    from Configurables import  LoKi__Hybrid__TrackSelector as LoKiTrackSelector
    filterTracks.addTool(LoKiTrackSelector,name="LokiTracksSelector")
    filterTracks.Selector = LoKiTrackSelector(name="LokiTracksSelector")
    filterTracks.Selector.Code = "(~TrINVALID) & ( TrCHI2PDOF < %(TrChi2)s )" % {"TrChi2":  HltRecoConf().getProp("GoodTrCHI2PDOF")}
    filterTracks.Selector.StatPrint = True
    return filterTracks
GaudiSequencer("TrackAddExtraInfoSeq").Members += [
    TrackHitAdder("TrackHitAdder",
                  TrackLocation="Rec/Track/Best",
                  MaxDistVelo=-1,
                  MaxDistOT=-1,
                  MaxDistTT=0.3,
                  MaxDistIT=0.3),
    #TrackOTClusterPruner(),
    ConfiguredEventFitter("TrackRefitter", TracksInContainer="Rec/Track/Best")
    #,TrackDoubleHitPruner("TrackDoubleHitPruner",TrackLocation = "Rec/Track/Best")
]

alignSelectorAlgs = []
alignSelectorA = TrackListRefiner("AlignSelectorA",
                                  inputLocation="Rec/Track/Best",
                                  outputLocation="Rec/Track/AlignTracksA",
                                  Selector=TrackSelector())
alignSelectorA.Selector.MaxChi2Cut = 5
alignSelectorA.Selector.MaxChi2PerDoFMatch = 5
alignSelectorA.Selector.MaxChi2PerDoFVelo = 5
alignSelectorA.Selector.MaxChi2PerDoFDownstream = 5
alignSelectorA.Selector.MinNTTHits = 3
alignSelectorA.Selector.MinPCut = 5000
alignSelectorA.Selector.MaxPCut = 200000
alignSelectorA.Selector.MinPtCut = 2000
alignSelectorA.Selector.TrackTypes = ["Long", "Downstream", "Upstream"]
alignSelectorA.Selector.TrackTypes = ["Long", "Downstream"]
alignSelectorA.Selector.TrackTypes = ["Long"]
alignSelectorAlgs.append(alignSelectorA)

#this one selects specifically overlap tracks. we only take T-tracks with overlaps
Пример #4
0
# the full Velo reconstruction
def recoVelo(OutputTracksName=HltSharedTrackLoc["Velo"]):
    recoVelo = FastVeloTracking( 'FastVeloHlt', OutputTracksName = OutputTracksName)
    recoVelo.StatPrint = True
    extendVelo = HltRecoConf().getProp("BeamGasMode")
    if extendVelo:
        recoVelo.ZVertexMin = HltRecoConf().getProp("VeloTrackingZMin")
        recoVelo.ZVertexMax = HltRecoConf().getProp("VeloTrackingZMax")
    recoVelo.VetoObjects = [ OutputTracksName ]
    return recoVelo


#### filter the Velo output
from Configurables import TrackListRefiner
filterVelo = TrackListRefiner('VeloFilter',
                              inputLocation = HltSharedTrackLoc["Velo"],
                              outputLocation = HltSharedTrackLoc["VeloSelection"])
from Configurables import  LoKi__Hybrid__TrackSelector as LoKiTrackSelector
filterVelo.addTool(LoKiTrackSelector,name="VeloSelector")
filterVelo.Selector = LoKiTrackSelector(name="VeloSelector")
veloSelector = filterVelo.Selector
veloSelector.Code = HltRecoConf().getProp("VeloSelectionCut")
veloSelector.StatPrint = True

#### VeloTT Tracking
from HltRecoConf import VeloTTOptions, VeloTTToolOptions
from Configurables import PatVeloTTHybrid, PatVeloTTHybridTool
recoVeloTT = PatVeloTTHybrid( 'PatVeloTTHybridHlt',
                        InputTracksName = HltSharedTrackLoc["VeloSelection"],
                        OutputTracksName = HltSharedTrackLoc["VeloTTHPT"],
                        **VeloTTOptions )
Пример #5
0
def doMyAlignChanges():
    from Configurables import TrackEventFitter, VeloTrackSelector
    from TrackFitter.ConfiguredFitters import ConfiguredStraightLineFitter
    TweakFitter(TrackEventFitter('FitMatch'))
    TweakFitter(TrackEventFitter('FitForward'))
    TweakFitter(TrackEventFitter('FitSeed'))
    TweakFitter(TrackEventFitter('FitVelo'))
    TweakFitter(TrackEventFitter('FitVeloTT'))
    TweakFitter(TrackEventFitter('RefitSeed'))
    TweakFitter(TrackEventFitter('TrackRefitter'))

    # add a filter on Velo tracks
    from Configurables import TrackListFilter
    GaudiSequencer("RecoVELOSeq").Members += [
        TrackListFilter("VeloFilter", inputLocation="Rec/Track/Velo")
    ]

    GaudiSequencer("RecoVELOSeq").Members += [
        TrackContainerCopy('VeloOnlyContainerCopy',
                           inputLocation="Rec/Track/Velo",
                           outputLocation="Rec/Track/VeloOnly",
                           copyFailures=True,
                           Selector=None),
        ConfiguredStraightLineFitter('VeloOnlyFitter',
                                     TracksInContainer="Rec/Track/VeloOnly")
    ]

    veloOnlyRefiner = TrackListRefiner(
        "VeloOnlySelector",
        inputLocation="Rec/Track/VeloOnly",
        outputLocation="Rec/Track/SelectedVeloOnly",
        Selector=TrackSelector())
    veloOnlyRefiner.Selector.MaxChi2Cut = 5
    #veloOnlyRefiner.OutputLevel = 1

    GaudiSequencer("RecoVELOSeq").Members.append(veloOnlyRefiner)

    GaudiSequencer("RecoVELOSeq").Members += [
        TrackListRefiner('VeloASideSelector',
                         inputLocation="Rec/Track/SelectedVeloOnly",
                         outputLocation="Rec/Track/VeloASide",
                         Selector=VeloTrackSelector()),
        TrackCaloMatchMonitor("VeloAEcalMatchMonitor",
                              TrackLocation='Rec/Track/VeloASide',
                              CaloSystem='Ecal',
                              RequireTHits=False)
    ]
    TrackListRefiner('VeloASideSelector').Selector.MinHitsASide = 6

    GaudiSequencer("RecoVELOSeq").Members += [
        TrackListRefiner('VeloCSideSelector',
                         inputLocation="Rec/Track/SelectedVeloOnly",
                         outputLocation="Rec/Track/VeloCSide",
                         Selector=VeloTrackSelector()),
        TrackCaloMatchMonitor("VeloCEcalMatchMonitor",
                              TrackLocation='Rec/Track/VeloCSide',
                              CaloSystem='Ecal',
                              RequireTHits=False)
    ]
    TrackListRefiner('VeloCSideSelector').Selector.MinHitsCSide = 6

    from Configurables import AlRobustAlignAlg
    GaudiSequencer("AlignMonitorSeq").Members += [
        AlRobustAlignAlg('VeloARobustAlign',
                         TrackLocation="Rec/Track/VeloASide"),
        AlRobustAlignAlg('VeloCRobustAlign',
                         TrackLocation="Rec/Track/VeloCSide")
    ]
    GaudiSequencer("AlignPostMonitorSeq").Members += [
        AlRobustAlignAlg('VeloARobustAlignPost',
                         TrackLocation="Rec/Track/VeloASide"),
        AlRobustAlignAlg('VeloCRobustAlignPost',
                         TrackLocation="Rec/Track/VeloCSide")
    ]

    from Configurables import Tf__Tsa__Seed, Tf__Tsa__SeedAddHits
    tsaSeed = Tf__Tsa__Seed("TsaSeed")
    tsaSeed.addTool(Tf__Tsa__SeedAddHits(), name="SeedAddHits")
    # tolerance if inside box mm
    tsaSeed.SeedAddHits.tol = 5
    # tolerance window make bigger mmm
    tsaSeed.SeedAddHits.dCut = 2
    # chi-sq cut
    tsaSeed.SeedAddHits.outlierCutParabola = 5

    from Configurables import STOfflinePosition
    itClusterPosition = STOfflinePosition('ToolSvc.ITClusterPosition')
    itClusterPosition.ErrorVec = [0.28, 0.22, 0.35, 0.35]
    itClusterPosition.APE = 0.1

    from Configurables import TrackFieldOffMatchMonitor

    seedRefiner = TrackListRefiner("SeedSelector",
                                   inputLocation="Rec/Track/Seed",
                                   outputLocation="Rec/Track/SelectedSeed",
                                   Selector=TrackSelector())
    seedRefiner.Selector.MaxChi2Cut = 5

    GaudiSequencer('MoniTrSeq').Members += [
        seedRefiner,
        TrackFieldOffMatchMonitor(
            VeloTrackLocation='Rec/Track/SelectedVeloOnly',
            SeedTrackLocation='Rec/Track/SelectedSeed')
    ]

    from Configurables import TrackMatchVeloSeed
    TrackMatchVeloSeed("TrackMatch").Chi2MatchingCut = 500
Пример #6
0
TAlignment().MinNumberOfHits = 5

# still set up a track selection
from Configurables import (GaudiSequencer, TrackContainerCopy, TrackSelector,
                           ITTrackSelector, TrackMonitor, TrackListRefiner,
                           TrackListMerger, TrackHitAdder)
from TrackFitter.ConfiguredFitters import *
trackFilterSeq = GaudiSequencer("TrackFilterSeq")

GaudiSequencer("TrackAddExtraInfoSeq").Members += [
    TrackHitAdder("TrackHitAdder", TrackLocation="Rec/Track/Best"),
    ConfiguredEventFitter("TrackRefitter", TracksInContainer="Rec/Track/Best")
]

alignSelectorA = TrackListRefiner("AlignSelectorA",
                                  inputLocation="Rec/Track/Best",
                                  outputLocation="Rec/Track/AlignTracksA",
                                  Selector=TrackSelector())
alignSelectorA.Selector.MaxChi2Cut = 10
alignSelectorA.Selector.MaxChi2PerDoFMatch = 10
alignSelectorA.Selector.MaxChi2PerDoFVelo = 3
alignSelectorA.Selector.MaxChi2PerDoFDownstream = 5
#alignSelectorA.Selector.MinNVeloRHits = 4
#alignSelectorA.Selector.MinNVeloPhiHits = 4
#alignSelectorA.Selector.MaxNVeloHoles = 2
#alignSelectorA.Selector.,MinNTTHits = 3
#alignSelectorA.Selector.TrackTypes = ["Long","Ttrack","Downstream","Upstream"]
alignSelectorA.Selector.TrackTypes = ["Long", "Ttrack"]

trackFilterSeq.Members.append(alignSelectorA)

alignSelectorB = TrackListRefiner("AlignSelectorB",
                           TrackSelector,TrackMonitor,ITTrackSelector,
                           TrackHitAdder,TrackDoubleHitPruner ) 
from TrackFitter.ConfiguredFitters import *

GaudiSequencer("TrackAddExtraInfoSeq").Members += [
    TrackHitAdder( "TrackHitAdder",
                   TrackLocation = "Rec/Track/Best",
                   MaxDistTT = 0.5),
    ConfiguredEventFitter("TrackRefitter",
                          TracksInContainer = "Rec/Track/Best" )
    #,TrackDoubleHitPruner("TrackDoubleHitPruner",TrackLocation = "Rec/Track/Best")
    ]

trackFilterSeq = GaudiSequencer("TrackFilterSeq")
alignSelectorA = TrackListRefiner("AlignSelectorA",
                                  inputLocation = "Rec/Track/Best",
                                  outputLocation = "Rec/Track/AlignTracksA",
                                  Selector = TrackSelector())
alignSelectorA.Selector.MaxChi2Cut = 10
alignSelectorA.Selector.MaxChi2PerDoFMatch = 10
alignSelectorA.Selector.MaxChi2PerDoFVelo = 5
alignSelectorA.Selector.MaxChi2PerDoFDownstream = 5
alignSelectorA.Selector.MinPCut = 5000
alignSelectorA.Selector.TrackTypes = ["Long","Downstream","Upstream"]
alignSelectorA.Selector.TrackTypes = ["Long","Downstream"]

#this one selects specifically overlap tracks. we only take T-tracks with overlaps
alignSelectorB = TrackListRefiner("AlignSelectorB",
                                  inputLocation = "Rec/Track/Best",
                                  outputLocation = "Rec/Track/AlignTracksB",
                                  Selector = ITTrackSelector())
alignSelectorB.Selector.RequireOverlap = True