Beispiel #1
0
    def __init__(self, name="EMBremCollectionBuilder", **kw):
        mlog = logging.getLogger(name + '::__init__')
        mlog.info("entering")

        super(egammaBremCollectionBuilder, self).__init__(name, **kw)

        import egammaRec.EMCommonRefitter

        # Extrapolator to be used for GSF (private)
        GSFBuildInDetExtrapolator = egammaExtrapolator()

        # GsfReffiter (private not in ToolSvc)
        from egammaTrackTools.egammaTrackToolsConf import egammaTrkRefitterTool
        GSFRefitterTool = egammaTrkRefitterTool(
            name='GSFRefitterTool',
            FitterTool=egammaRec.EMCommonRefitter.getGSFTrackFitter(),
            useBeamSpot=False,
            Extrapolator=GSFBuildInDetExtrapolator,
            ReintegrateOutliers=True)

        #
        #  BLayer and Pixel Related Tools (private = True)
        #
        GSFBuildTestBLayerTool = None
        GSFBuildPixelToTPIDTool = None
        if DetFlags.haveRIO.pixel_on():
            GSFPixelConditionsSummaryTool = (
                TrackingCommon.getInDetPixelConditionsSummaryTool())
            if InDetFlags.usePixelDCS():
                GSFPixelConditionsSummaryTool.IsActiveStates = [
                    'READY', 'ON', 'UNKNOWN', 'TRANSITION', 'UNDEFINED'
                ]
                GSFPixelConditionsSummaryTool.IsActiveStatus = [
                    'OK', 'WARNING', 'ERROR', 'FATAL'
                ]

            GSFBuildTestBLayerTool = TrackingCommon.getInDetRecTestBLayerTool(
                name="GSFBuildTestBLayerTool",
                PixelSummaryTool=GSFPixelConditionsSummaryTool,
                Extrapolator=GSFBuildInDetExtrapolator,
                private=True)

            GSFBuildPixelToTPIDTool = TrackingCommon.getInDetPixelToTPIDTool(
                name="GSFBuildPixelToTPIDTool", private=True)
        #
        #  TRT_ElectronPidTool (private =True)
        #
        GSFBuildTRT_ElectronPidTool = None
        if DetFlags.haveRIO.TRT_on(
        ) and not InDetFlags.doSLHC() and not InDetFlags.doHighPileup():
            GSFBuildTRT_ElectronPidTool = (
                TrackingCommon.getInDetTRT_ElectronPidTool(
                    name="GSFBuildTRT_ElectronPidTool", private=True))

        #
        #  InDet Track Summary Helper, no Association and no hole
        #  as we do not redo them (private = true)
        #
        GSFBuildTrackSummaryHelperTool = TrackingCommon.getInDetSummaryHelper(
            name="GSFBuildTrackSummaryHelperTool",
            AssoTool=None,
            HoleSearch=None,
            PixelToTPIDTool=GSFBuildPixelToTPIDTool,
            TestBLayerTool=GSFBuildTestBLayerTool,
            DoSharedHits=False,
            private=True)

        #
        #  TrkTrackSummaryTool: no shared hits  no hole search
        #  still public due to TrackParticleCreatorTool
        #
        GSFBuildInDetTrackSummaryTool = (
            TrackingCommon.getInDetTrackSummaryTool(
                name="GSFBuildInDetTrackSummaryTool",
                InDetSummaryHelperTool=GSFBuildTrackSummaryHelperTool,
                doSharedHits=False,
                doHolesInDet=False,
                TRT_ElectronPidTool=GSFBuildTRT_ElectronPidTool,
                PixelToTPIDTool=GSFBuildPixelToTPIDTool))

        #
        #  Track Particle Creator tool (private not in ToolSvc)
        #  But needs a public extrapolator and
        #  InDetTrackSummaryTool still...
        #
        from TrkParticleCreator.TrkParticleCreatorConf import (
            Trk__TrackParticleCreatorTool)

        GSFBuildInDetParticleCreatorTool = Trk__TrackParticleCreatorTool(
            name="GSFBuildInDetParticleCreatorTool",
            KeepParameters=True,
            Extrapolator=AtlasPublicExtrapolator(),
            TrackSummaryTool=GSFBuildInDetTrackSummaryTool,
            UseTrackSummaryTool=False)
        #
        #  Track slimming (private not in ToolSvc)
        #
        from TrkTrackSlimmingTool.TrkTrackSlimmingToolConf import (
            Trk__TrackSlimmingTool as ConfigurableTrackSlimmingTool)
        GSFBuildInDetTrkSlimmingTool = ConfigurableTrackSlimmingTool(
            name="GSFBuildInDetTrackSlimmingTool",
            KeepParameters=False,
            KeepOutliers=True)
        #
        #  Default Configuration
        #
        self.TrackRefitTool = GSFRefitterTool
        self.TrackParticleCreatorTool = GSFBuildInDetParticleCreatorTool
        self.TrackSlimmingTool = GSFBuildInDetTrkSlimmingTool
        self.TrackSummaryTool = GSFBuildInDetTrackSummaryTool
Beispiel #2
0
CombinedMuonIDBoundaryCheckTool = InDet__InDetBoundaryCheckTool(
    name="CombinedMuonIDBoundaryCheckTool",
    UsePixel=DetFlags.haveRIO.pixel_on(),
    UseSCT=DetFlags.haveRIO.SCT_on())
ToolSvc += CombinedMuonIDBoundaryCheckTool

# load InDetHoleSearchTool
from InDetTrackHoleSearch.InDetTrackHoleSearchConf import InDet__InDetTrackHoleSearchTool
ToolSvc += InDet__InDetTrackHoleSearchTool( \
  name                         = "CombinedMuonIDHoleSearch",
Extrapolator                 = atlasExtrapolator,
BoundaryCheckTool            = CombinedMuonIDBoundaryCheckTool,
CountDeadModulesAfterLastHit = True)

import InDetRecExample.TrackingCommon as TrackingCommon
InDetPixelConditionsSummaryTool = TrackingCommon.getInDetPixelConditionsSummaryTool(
)

if muonCombinedRecFlags.useDetailedPixelHoleSearch():
    # now get the InDet tools as used for InDet tracks
    #   (duplication for ESD running in case InDet not rerun)
    #   attention: defaults defined first with some DetFlag specific properties added further down
    from InDetTestPixelLayer.InDetTestPixelLayerConf import InDet__InDetTestPixelLayerTool
    ToolSvc += InDet__InDetTestPixelLayerTool(
        name="CombinedMuonInDetTestPixelLayerTool",
        Extrapolator=atlasExtrapolator,
        CheckActiveAreas=True,
        CheckDeadRegions=True)
    ToolSvc.CombinedMuonIDHoleSearch.PixelLayerTool = ToolSvc.CombinedMuonInDetTestPixelLayerTool

if beamFlags.beamType() == 'cosmics':
    ToolSvc.CombinedMuonIDHoleSearch.Cosmics = True