Пример #1
0
    def configure(self):
        mlog = logging.getLogger(self._name + '::configure :')

        from TrkAlignGenTools.AlignmentTrackFitter import AlignmentTrackFitter
        #from MuonTrackFinderTools.MuonTrackFinderToolsConf import Muon__MuonRefitTool
        from MuonTrackFinderTools.MuonTrackFinderToolsConf import Muon__MuonRefitTool
        muonRefitTool = Muon__MuonRefitTool(
            "MuonRefitToolForAlignment",
            OutputLevel=align.OutputLevel(),
            Fitter=AlignmentTrackFitter().fitter())

        from __main__ import ToolSvc
        ToolSvc += muonRefitTool

        # create tool instance
        from MuonAlignGenTools.MuonAlignGenToolsConf import Muon__MuonAlignRefitTool
        muonAlignRefitTool = Muon__MuonAlignRefitTool(
            OutputLevel=align.OutputLevel())

        combmu = mualign.selectCombinedMuons()

        muonAlignRefitTool.MuonRefitTool = muonRefitTool

        muonAlignRefitTool.RemoveBIS8Hits = False
        muonAlignRefitTool.RemoveTGCHits = False
        muonAlignRefitTool.RemoveTGCEtaHits = True
        muonAlignRefitTool.RemoveRPCEtaHits = True
        muonAlignRefitTool.RemoveCSCPhiHits = True
        muonAlignRefitTool.DeclusterTGCHits = False
        muonAlignRefitTool.RemoveSmallBarrelHits = False

        muonAlignRefitTool.RemoveCSCHits = mualign.removeCSCHits()
        muonAlignRefitTool.RemoveBEEHits = not mualign.alignEE()
        muonAlignRefitTool.RemoveEEHits = not mualign.alignEE()

        muonAlignRefitTool.RemoveBarrelHits = not mualign.alignBarrel()
        muonAlignRefitTool.RemoveEndcapHits = not mualign.alignEndcap()
        muonAlignRefitTool.RemoveTRTHits = mualign.removeTRTHits()
        muonAlignRefitTool.RemoveScattering = not align.includeScatterers()

        muonAlignRefitTool.RecreateStartingParameters = not mualign.selectCombinedMuons(
        )
        muonAlignRefitTool.ExtrapolateToMuonEntry = not mualign.selectCombinedMuons(
        )

        self._MuonAlignRefitToolHandle = muonAlignRefitTool

        mlog.info(" now adding to ToolSvc")
        from __main__ import ToolSvc
        ToolSvc += self.MuonAlignRefitToolHandle()

        mlog.info(" leaving configure")

        return True
    def configure(self):
        mlog = logging.getLogger(self._name + '::configure :')

        # create tool instance
        from TrkAlignGenTools.AlignmentTrackFitter import AlignmentTrackFitter
        from MuonAlignGenTools.MuonAlignGenToolsConf import Muon__MuonAlignHelperTool, Muon__MuonTrackPreProcessor

        from MuonAlignGenTools.MuonAlignRefitToolGetter import MuonAlignRefitToolGetter
        muonAlignRefitTool = MuonAlignRefitToolGetter(
        ).MuonAlignRefitToolHandle()

        muonAlignHelperTool = Muon__MuonAlignHelperTool(
            OutputLevel=align.OutputLevel())

        from __main__ import ToolSvc
        ToolSvc += muonAlignHelperTool

        muonTrackPreProcessor = Muon__MuonTrackPreProcessor(
            OutputLevel=align.OutputLevel(),
            TrackFitterTool=AlignmentTrackFitter().fitter(),
            MuonAlignRefitTool=muonAlignRefitTool)

        if align.useSLFitter():
            muonTrackPreProcessor.SLTrackFitterTool = AlignmentTrackFitter(
            ).slfitter()

        muonTrackPreProcessor.RefitTracks = align.refitTracks()
        muonTrackPreProcessor.ParticleNumber = align.particleNumber()
        muonTrackPreProcessor.RunOutlierRemoval = align.runOutlierRemoval()
        muonTrackPreProcessor.RedoErrorScaling = mualign.redoErrorScaling()
        muonTrackPreProcessor.pTCorrectTrack = mualign.pTCorrectTrack()
        muonTrackPreProcessor.RemovePerigeeBeforeRefit = mualign.removePerigeeBeforeRefit(
        )

        muonTrackPreProcessor.ResetScatteringAngles = mualign.resetScatteringAngles(
        )

        muonTrackPreProcessor.ApplyStandardSelectionCuts = mualign.applyStandardSelectionCuts(
        )
        muonTrackPreProcessor.ApplySelectionCuts = mualign.applySelectionCuts()
        muonTrackPreProcessor.RequireOneHitPerTubeLayerEC = mualign.requireOneHitPerTubeLayerEC(
        )
        muonTrackPreProcessor.RequireInnerLayerEndcapMdt = mualign.requireInnerLayerECTracks(
        )
        muonTrackPreProcessor.RequireOuterLayerEndcapMdt = mualign.requireOuterLayerECTracks(
        )
        muonTrackPreProcessor.RequireBarrelECOverlap = mualign.requireBarrelECOverlap(
        )
        muonTrackPreProcessor.CutOnBarrel = mualign.cutOnBarrelTracks()
        muonTrackPreProcessor.RequireRPCPhiHit = mualign.requireRPCPhiHit()
        muonTrackPreProcessor.RequireSmallLargeOverlap = mualign.requireSmallLargeOverlap(
        )

        muonTrackPreProcessor.MuonContainer = mualign.MuonContainerName()
        muonTrackPreProcessor.SelectCombinedMuons = mualign.selectCombinedMuons(
        )

        muonTrackPreProcessor.MSID_ptDiffCut = mualign.msidPtDiffCut()
        muonTrackPreProcessor.chiSqCut = mualign.cutOnTrackChisquare()
        muonTrackPreProcessor.nAllowedHoles = mualign.cutOnNumHolesOnTrack()
        muonTrackPreProcessor.nAllowedOutliers = mualign.cutOnNumOutlierOnTrack(
        )
        muonTrackPreProcessor.MaxDriftSignSum = mualign.cutOnMaxDriftSignSum()

        self._MuonTrackPreProcessorHandle = muonTrackPreProcessor

        mlog.info(" adding MuonTrackPreProcessor to ToolSvc")
        ToolSvc += muonAlignHelperTool

        mlog.info(" leaving configure")

        return True