コード例 #1
0
    def configure(self):
        mlog = logging.getLogger(self._name + '::configure :')

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

        # create tool instance
        from MuonAlignGenTools.MuonAlignGenToolsConf import Muon__MuonTrackCollectionProvider
        muonTrackCollectionProvider = Muon__MuonTrackCollectionProvider(
            "MuonTrackCollectionProvider",
            OutputLevel=align.OutputLevel(),
            InputMuonCol=mualign.MuonContainerName(),
            InputTrackCol=align.inputTrkCol(),
            InputIDTrackCol=mualign.inputIDTrackCol(),
            UseStandaloneTracks=mualign.useStandaloneTracks(),
            TrackType=mualign.inputTrackCollectionType(),
            MomentumCut=mualign.momentumCut(),
            MuonAlignRefitTool=muonAlignRefitTool)

        self._muonTrackCollectionProviderHandle = muonTrackCollectionProvider

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

        mlog.info(" leaving configure")

        return True
コード例 #2
0
    def configure ( self ) :
        mlog = logging.getLogger( self._name+'::configure :' )

        # create tool instance
        from TrkAlignGenTools.AlignResidualCalculatorGetter import AlignResidualCalculatorGetter
        resCalc = AlignResidualCalculatorGetter().ResidualPullCalculatorHandle()
        
        from MuonAlignGenTools.MuonAlignGenToolsConf import Muon__MuonFillNtupleTool
        from MuonAlignGenTools.MuonAlignmentIOFiles import MuonAlignmentIOFiles
        muonIO = MuonAlignmentIOFiles()
        muonFillNtupleTool = Muon__MuonFillNtupleTool(OutputLevel = align.OutputLevel(),
                                                      ResidualPullCalculator = resCalc,
                                                      MuonContainer = mualign.MuonContainerName())

        from MuonAlignGenTools.MuonAlignModuleToolGetter import MuonAlignModuleToolGetter
        muonAlignModuleTool = MuonAlignModuleToolGetter().MuonAlignModuleToolHandle()
        muonFillNtupleTool.AlignModuleTool = muonAlignModuleTool
        muonFillNtupleTool.BigNtuple = mualign.doBigNtuple()

        
        from MuTagTools.MuTagToolsConf import MuTagEDMHelper
        ConfiguredMuTagEDMHelper = MuTagEDMHelper("ConfiguredMuTagEDMHelper")
        from __main__ import ToolSvc
        ToolSvc += ConfiguredMuTagEDMHelper        
        muonFillNtupleTool.muTagEDMHelperTool = ConfiguredMuTagEDMHelper

        self._MuonFillNtupleToolHandle = muonFillNtupleTool

        mlog.info(" leaving configure" )

        return True
コード例 #3
0
    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