Esempio n. 1
0
def getFatrasNavigator(name="ISF_FatrasNavigator", **kwargs):
    # the Navigator (needed for several instances)
    from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
    kwargs.setdefault("TrackingGeometrySvc"  , AtlasTrackingGeometrySvc)#getService('ISF_FatrasTrackingGeometrySvc'))

    from TrkExTools.TrkExToolsConf import Trk__Navigator
    return Trk__Navigator(name, **kwargs )
Esempio n. 2
0
def getGSFTrackFitter():
    egRotCreator = TrackingCommon.getInDetRotCreator(name='egRotCreator',
                                                     private=True)

    TrackingCommon.createAndAddCondAlg(
        TrackingCommon.getRIO_OnTrackErrorScalingCondAlg,
        'RIO_OnTrackErrorScalingCondAlg')

    # get Rk propagator
    from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import (
        Trk__RungeKuttaPropagator as Propagator)

    egTrkPropagator = Propagator(name='egTrkPropagator')
    egTrkPropagator.AccuracyParameter = 0.0001

    # Setup the Navigator (default)
    from TrkDetDescrSvc.AtlasTrackingGeometrySvc import (
        AtlasTrackingGeometrySvc)

    from TrkExTools.TrkExToolsConf import Trk__Navigator
    egTrkNavigator = Trk__Navigator(
        name='egTrkNavigator', TrackingGeometrySvc=AtlasTrackingGeometrySvc)

    # Set up the GSF
    from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
        Trk__GsfMaterialMixtureConvolution)

    GsfMaterialUpdator = Trk__GsfMaterialMixtureConvolution(
        name='GsfMaterialUpdator', MaximumNumberOfComponents=12)

    from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
        Trk__GsfExtrapolator)

    GsfExtrapolator = Trk__GsfExtrapolator(
        name='GsfExtrapolator',
        Propagators=[egTrkPropagator],
        SearchLevelClosestParameters=10,
        StickyConfiguration=True,
        Navigator=egTrkNavigator,
        GsfMaterialConvolution=GsfMaterialUpdator,
        SurfaceBasedMaterialEffects=False)

    from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
        Trk__GaussianSumFitter)

    GSFTrackFitter = Trk__GaussianSumFitter(
        name='GSFTrackFitter',
        ToolForExtrapolation=GsfExtrapolator,
        ReintegrateOutliers=True,
        MakePerigee=True,
        RefitOnMeasurementBase=True,
        DoHitSorting=True,
        ToolForROTCreation=egRotCreator)
    # --- end of fitter loading
    return GSFTrackFitter
Esempio n. 3
0
    def __init__(self, name='LocalExtrapolator'):

        # get the correct TrackingGeometry setup
        include('TrkDetDescrSvc/LocalTrackingGeometrySvc.py')
        from __main__ import LocalTrackingGeometrySvc
        from __main__ import ToolSvc

        # the Navigator has to get this one
        from TrkExTools.TrkExToolsConf import Trk__Navigator
        LocalNavigator = Trk__Navigator(name='LocalNavigator')
        LocalNavigator.TrackingGeometryName = LocalTrackingGeometrySvc.TrackingGeometryName
        ToolSvc += LocalNavigator

        # the standard RungeKuttaPropagator
        from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator
        LocalPropagator = Propagator(name='LocalPropagator')
        ToolSvc += LocalPropagator
        # call the base class constructor
        Trk__Extrapolator.__init__(self,
                                   name,
                                   Navigator=LocalNavigator,
                                   Propagators=[LocalPropagator])
Esempio n. 4
0
    def __init__(self, name = 'ConfiguredTrigL2_Extrapolator') :
        Trk__Extrapolator.__init__(self, name)
        from AthenaCommon.AppMgr import ToolSvc
        from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc

        from IOVDbSvc.CondDB import conddb
        if not (conddb.folderRequested( "/Indet/TrkErrorScaling" ) or conddb.folderRequested( "/Indet/Onl/TrkErrorScaling" )):
            conddb.addFolderSplitOnline("INDET", "/Indet/Onl/TrkErrorScaling", "/Indet/TrkErrorScaling" )
        
        from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator
        TrigL2_StepPropagator = Trk__STEP_Propagator(name = 'TrigL2_StepPropagator')
        ToolSvc += TrigL2_StepPropagator
        from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator
        TrigL2_RKPropagator = Trk__RungeKuttaPropagator(name = 'TrigL2_RKPropagator')
        ToolSvc += TrigL2_RKPropagator
        from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
        if InDetTrigFlags.propagatorType() is "STEP":
            TrigL2_Propagator = TrigL2_StepPropagator
        else:
            TrigL2_Propagator = TrigL2_RKPropagator
        
        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
        AtlasTrackingGeometrySvc  = svcMgr.AtlasTrackingGeometrySvc
        from TrkExTools.TrkExToolsConf import Trk__Navigator
        TrigL2_Navigator = Trk__Navigator(name = 'TrigL2_Navigator',TrackingGeometrySvc = AtlasTrackingGeometrySvc)
        ToolSvc += TrigL2_Navigator
        from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator
        TrigL2_MaterialUpdator = Trk__MaterialEffectsUpdator(name = "TrigL2_MaterialEffectsUpdator")
        ToolSvc += TrigL2_MaterialUpdator
        TrigL2_SubPropagators = []
        TrigL2_SubUpdators = []
        TrigL2_SubPropagators += [ TrigL2_Propagator.name() ]
        TrigL2_SubUpdators    += [ TrigL2_MaterialUpdator.name() ]
        TrigL2_SubPropagators += [ TrigL2_Propagator.name() ]
        TrigL2_SubUpdators    += [ TrigL2_MaterialUpdator.name() ]
        TrigL2_SubPropagators += [ TrigL2_StepPropagator.name() ]
        TrigL2_SubUpdators    += [ TrigL2_MaterialUpdator.name() ]
        self.Propagators             = [ TrigL2_RKPropagator, TrigL2_StepPropagator]
        self.MaterialEffectsUpdators = [ TrigL2_MaterialUpdator ]
        self.Navigator               = TrigL2_Navigator
        self.SubPropagators          = TrigL2_SubPropagators
        self.SubMEUpdators           = TrigL2_SubUpdators
Esempio n. 5
0
# validate also the collection of material layers
MaterialCollectionValidation = False

# create the extrapolator
from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
MyExtrapolator = AtlasExtrapolator(name='TestExtrapolator')
MyExtrapolator.NavigationStatisticsOutput = True
MyExtrapolator.OutputLevel = INFO
MyExtrapolator.StopWithNavigationBreak = True
MyExtrapolator.DoCaloDynamic = True
MyExtrapolator.MaterialEffectsOnTrackValidation = True
MyExtrapolator.RequireMaterialDestinationHit = MaterialCollectionValidation
MyExtrapolator.setEnergyLoss(False)

from TrkExTools.TrkExToolsConf import Trk__Navigator
MyNavigator = Trk__Navigator(name='TestNavigator')
MyNavigator.OutputLevel = INFO
ToolSvc += MyNavigator

MyExtrapolator.Navigator = MyNavigator
ToolSvc += MyExtrapolator

# create the algorithm
from TrkExAlgs.TrkExAlgsConf import Trk__ExtrapolationValidation

ExtrapolationValidation = Trk__ExtrapolationValidation(
    'ExtrapolationValidation')
ExtrapolationValidation.Extrapolator = MyExtrapolator
ExtrapolationValidation.StartPerigeeMinP = 10000
ExtrapolationValidation.StartPerigeeMaxP = 150000
ExtrapolationValidation.ValidateMaterialCollection = MaterialCollectionValidation
InDetPropagator = Propagator(name = 'InDetPropagator')
if InDetFlags.propagatorType() is "RungeKutta":
  InDetPropagator.AccuracyParameter = 0.0001
ToolSvc += InDetPropagator

# set up the propagator for outside ID (A.S. needed as a fix for 14.5.0 )
from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as StepPropagator
InDetStepPropagator = StepPropagator(name = 'InDetStepPropagator')
ToolSvc += InDetStepPropagator
if InDetFlags.doPrintConfigurables: print      InDetPropagator

#
# Setup the Navigator (default, could be removed)
#
from TrkExTools.TrkExToolsConf import Trk__Navigator
InDetNavigator = Trk__Navigator(name                = 'InDetNavigator',
                                TrackingGeometrySvc = AtlasTrackingGeometrySvc)
ToolSvc += InDetNavigator
if InDetFlags.doPrintConfigurables: print      InDetNavigator

#
# Setup the MaterialEffectsUpdator
#
from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator
InDetMaterialUpdator = Trk__MaterialEffectsUpdator(name = "InDetMaterialEffectsUpdator")
if not InDetFlags.solenoidOn():
  InDetMaterialUpdator.EnergyLoss = False
  InDetMaterialUpdator.ForceMomentum = True
  InDetMaterialUpdator.ForcedMomentumValue = 1000*MeV

ToolSvc += InDetMaterialUpdator
Esempio n. 7
0
TestUpdators += [TestMaterialEffectsUpdator]

TestMaterialEffectsUpdatorLandau = MaterialEffectsUpdator(
    name='TestMaterialEffectsUpdatorLandau')
TestMaterialEffectsUpdatorLandau.LandauMode = True
ToolSvc += TestMaterialEffectsUpdatorLandau
if myPDG == 998:
    TestMaterialEffectsUpdatorLandau.EnergyLoss = False
    TestMaterialEffectsUpdatorLandau.MultipleScattering = False

##TestUpdators    += [ TestMaterialEffectsUpdatorLandau ]

# the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY) --------------------------------------------------------------
from TrkExTools.TrkExToolsConf import Trk__Navigator
TestNavigator = Trk__Navigator(name='TestNavigator')
TestNavigator.TrackingGeometrySvc = "Trk::TrackingGeometrySvc/AtlasTrackingGeometrySvc"
ToolSvc += TestNavigator

# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE

TestSubPropagators = []
TestSubUpdators = []

# -------------------- set it depending on the geometry ----------------------------------------------------
# default for ID is (Rk,Mat)
TestSubPropagators += [TestPropagator.name()]
TestSubUpdators += [TestMaterialEffectsUpdator.name()]

# default for Calo is (Rk,MatLandau)
TestSubPropagators += [TestPropagator.name()]
Esempio n. 8
0
    def __init__(self,
                 instname='InDetAlignTrackSelTool',
                 propagatorType='RungeKutta'):

        # Load the Dlls
        if 'InDetAlignGenTools' not in theApp.Dlls:
            theApp.Dlls += ['InDetAlignGenTools']

        # Set names
        self.__instname__ = instname
        self.__svcname__ = 'InDetAlignTrackSelTool'

        self.__toolname__ = 'ToolSvc.' + self.__instname__
        self.__thistool__ = Service(self.__toolname__)

        # Set options for tool
        self.__thistool__.MinMomentum = 0
        self.__thistool__.MinPt = 2
        self.__thistool__.MaxShared = 0
        self.__thistool__.MaxHoles = 1
        self.__thistool__.MinChi2Prob = 0.2

        ToolSvc = Service("ToolSvc")

        # Propagator
        if propagatorType is "STEP":
            from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as Propagator
        else:
            from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator
        InDetAlignTrackSelPropagator = Propagator(
            name='InDetAlignTrackSelPropagator')
        ToolSvc += InDetAlignTrackSelPropagator
        print InDetAlignTrackSelPropagator

        # Navigator
        from TrkExTools.TrkExToolsConf import Trk__Navigator
        InDetAlignTrackSelNavigator = Trk__Navigator(
            name='InDetAlignTrackSelNavigator')
        ToolSvc += InDetAlignTrackSelNavigator
        print InDetAlignTrackSelNavigator

        # Material updator
        from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator
        InDetAlignTrackSelMaterialUpdator = Trk__MaterialEffectsUpdator(
            name="InDetAlignTrackSelMaterialEffectsUpdator")
        ToolSvc += InDetAlignTrackSelMaterialUpdator
        print InDetAlignTrackSelMaterialUpdator

        # Extrapolator
        from TrkExTools.TrkExToolsConf import Trk__Extrapolator
        InDetAlignTrackSelExtrapolator = Trk__Extrapolator(
            name='InDetAlignTrackSelExtrapolator',
            Propagators=[InDetAlignTrackSelPropagator.getType()],
            PropagatorInstances=[InDetAlignTrackSelPropagator.getName()],
            Navigator=InDetAlignTrackSelNavigator,
            MaterialEffectsUpdator=InDetAlignTrackSelMaterialUpdator)
        ToolSvc += InDetAlignTrackSelExtrapolator
        print InDetAlignTrackSelExtrapolator

        # associator
        from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels
        InDetAlignTrackSelAssociationTool = InDet__InDetPRD_AssociationToolGangedPixels(
        )
        ToolSvc += InDetAlignTrackSelAssociationTool

        # summary
        from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool
        InDetAlignTrackSelSummaryTool = InDet__InDetTrackSummaryHelperTool(
            name="InDetAlignTrackSelSummaryTool",
            Extrapolator=InDetAlignTrackSelExtrapolator,
            AssoTool=InDetAlignTrackSelAssociationTool,
            DoSharedHits=True)
        ToolSvc += InDetAlignTrackSelSummaryTool
        print InDetAlignTrackSelSummaryTool
Esempio n. 9
0
#Fitter:
if vp1Fitter and vp1Extrapolator and (vp1ID or vp1Muon):
    VP1TrkInitializer.ForceFitterTools = True
    os.putenv("VP1_DEVEL_ENABLEREFIT", "1")
    ##########################################################
    # The Extrapolator
    include('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py')

    from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator
    VP1Propagator = Propagator(name='VP1Propagator')
    ToolSvc += VP1Propagator

    # the Navigator has to get this one
    from TrkExTools.TrkExToolsConf import Trk__Navigator
    VP1Navigator = Trk__Navigator(name='VP1Navigator')
    VP1Navigator.TrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc
    ToolSvc += VP1Navigator

    from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MatUpdator
    VP1MaterialUpdator = MatUpdator(name='VP1MaterialEffectsUpdator')
    ToolSvc += VP1MaterialUpdator

    from TrkMeasurementUpdator_xk.TrkMeasurementUpdator_xkConf import Trk__KalmanUpdator_xk
    VP1Updator = Trk__KalmanUpdator_xk(name='VP1Updator')
    ToolSvc += VP1Updator

    from TrkDynamicNoiseAdjustor.TrkDynamicNoiseAdjustorConf import Trk__InDetDynamicNoiseAdjustment
    VP1DNAdjustor = Trk__InDetDynamicNoiseAdjustment(name='VP1DNAdjustor')
    #yminmax = 100.0)
    ToolSvc += VP1DNAdjustor
Esempio n. 10
0
# Magnetic field tool
#
from TrkMagFieldTools.TrkMagFieldToolsConf import Trk__MagneticFieldTool

LocalMagField = Trk__MagneticFieldTool(name='LocalMagField')
ToolSvc += LocalMagField
print LocalMagField
#
# get the ATLAS tracking geometry
include('TrkDetDescrSvc/LocalTrackingGeometrySvc.py')

# Setup the Navigator (default, could be removed)
#
from TrkExTools.TrkExToolsConf import Trk__Navigator

LocalNavigator = Trk__Navigator(name='LocalNavigator')
LocalNavigator.TrackingGeometryName = LocalTrackingGeometrySvc.TrackingGeometryName
ToolSvc += LocalNavigator
print LocalNavigator
#
# Setup the MaterialEffectsUpdator
#
from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator

LocalMaterialUpdator = Trk__MaterialEffectsUpdator(
    name="LocalMaterialEffectsUpdator")
ToolSvc += LocalMaterialUpdator
print LocalMaterialUpdator
#
# set the propagator
#
Esempio n. 11
0
    def __init__(self, name='AtlasExtrapolator'):

        # get the correct TrackingGeometry setup
        from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
        AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc

        # import the ToolSvc
        from AthenaCommon.AppMgr import ToolSvc
        if 'ToolSvc' not in dir():
            ToolSvc = ToolSvc()

        # PROPAGATOR DEFAULTS --------------------------------------------------------------------------------------

        self.AtlasPropagators = []

        from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as RkPropagator
        AtlasRungeKuttaPropagator = RkPropagator(
            name='AtlasRungeKuttaPropagator')
        ToolSvc += AtlasRungeKuttaPropagator

        self.AtlasPropagators += [AtlasRungeKuttaPropagator]

        from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator
        AtlasSTEP_Propagator = STEP_Propagator(name='AtlasSTEP_Propagator')
        ToolSvc += AtlasSTEP_Propagator

        self.AtlasPropagators += [AtlasSTEP_Propagator]

        # UPDATOR DEFAULTS -----------------------------------------------------------------------------------------

        self.AtlasUpdators = []

        from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator as MaterialEffectsUpdator
        AtlasMaterialEffectsUpdator = MaterialEffectsUpdator(
            name='AtlasMaterialEffectsUpdator')
        ToolSvc += AtlasMaterialEffectsUpdator

        self.AtlasUpdators += [AtlasMaterialEffectsUpdator]

        AtlasMaterialEffectsUpdatorLandau = MaterialEffectsUpdator(
            name='AtlasMaterialEffectsUpdatorLandau')
        AtlasMaterialEffectsUpdatorLandau.LandauMode = True
        ToolSvc += AtlasMaterialEffectsUpdatorLandau

        self.AtlasUpdators += [AtlasMaterialEffectsUpdatorLandau]

        # the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY) --------------------------------------------------------------
        from TrkExTools.TrkExToolsConf import Trk__Navigator
        AtlasNavigator = Trk__Navigator(name='AtlasNavigator')
        AtlasNavigator.TrackingGeometrySvc = AtlasTrackingGeometrySvc
        ToolSvc += AtlasNavigator

        # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE

        AtlasSubPropagators = []
        AtlasSubUpdators = []

        # -------------------- set it depending on the geometry ----------------------------------------------------
        # default for Global is (Rk,Mat)
        AtlasSubPropagators += [AtlasRungeKuttaPropagator.name()]
        AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name()]

        # default for ID is (Rk,Mat)
        AtlasSubPropagators += [AtlasRungeKuttaPropagator.name()]
        AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name()]

        # default for BeamPipe is (Rk,Mat)
        AtlasSubPropagators += [AtlasRungeKuttaPropagator.name()]
        AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name()]

        # default for Calo is (STEP,Mat)
        AtlasSubPropagators += [AtlasSTEP_Propagator.name()]
        AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name()]

        # default for MS is (STEP,Mat)
        AtlasSubPropagators += [AtlasSTEP_Propagator.name()]
        AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name()]

        # default for Cavern is (Rk,Mat)
        AtlasSubPropagators += [AtlasRungeKuttaPropagator.name()]
        AtlasSubUpdators += [AtlasMaterialEffectsUpdator.name()]

        # ----------------------------------------------------------------------------------------------------------

        # call the base class constructor
        Trk__Extrapolator.__init__(self,name,\
                                   Navigator = AtlasNavigator,\
                                   MaterialEffectsUpdators = self.AtlasUpdators,\
                                   Propagators = self.AtlasPropagators,\
                                   SubPropagators = AtlasSubPropagators,\
                                   SubMEUpdators = AtlasSubUpdators,\
                                   DoCaloDynamic = False
                                   )
Esempio n. 12
0
# combined tracking geometry options
from TrkDetDescrSvc.TrkDetDescrSvcConf import TrackingGeometrySvc
MuonTrackingGeometrySvc = TrackingGeometrySvc( name ="MuonTrackingGeometrySvc",
                                               TrackingGeometryName = "MuonStandaloneTrackingGeometry",
                                               GeometryBuilder = MuonStandAloneGeometryBuilder,
                                               BuildGeometryFromTagInfo = True ,
                                               AssignMaterialFromCOOL = False,
                                               CallbackStringCheck = True )

from AthenaCommon.AppMgr import ServiceMgr as svcMgr
svcMgr += MuonTrackingGeometrySvc
 
# the navigator Configurable way
from TrkExTools.TrkExToolsConf import Trk__Navigator
MuonTGNavigator = Trk__Navigator( name = 'MuonTGNavigator',
                                TrackingGeometrySvc = MuonTrackingGeometrySvc
                                )
ToolSvc += MuonTGNavigator
print      MuonTGNavigator
 
# Configurable way
from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator
MuonTGMaterialUpdator = Trk__MaterialEffectsUpdator( name = "MuonTGMaterialUpdator"
                                                   )
ToolSvc += MuonTGMaterialUpdator
print MuonTGMaterialUpdator
 
from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator
MuonTGPropagator = Trk__STEP_Propagator( name = 'MuonTGPropagator' ,Tolerance=0.0001, MaterialEffects=True,IncludeBgradients=False)
ToolSvc += MuonTGPropagator
print      MuonTGPropagator
Esempio n. 13
0
    def set_iPatFitter(self):
        from AthenaCommon.AppMgr import ToolSvc
        from MuonRecExample import MuonRecTools
        MuonExtrapolator = MuonRecTools.getPublicTool('MuonExtrapolator')

        from AthenaCommon.Include import include
        include('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py')

        # set up the extrapolator and fitter as used by Muid
        from TrkExRungeKuttaIntersector.TrkExRungeKuttaIntersectorConf import \
            Trk__IntersectorWrapper as Propagator
        MuidPropagator = Propagator(name='MuidPropagator')
        ToolSvc += MuidPropagator

        from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator
        MuidMaterialUpdator = Trk__MaterialEffectsUpdator(
            name="MuidMaterialEffectsUpdator")
        ToolSvc += MuidMaterialUpdator

        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
        from TrkExTools.TrkExToolsConf import Trk__Navigator
        MuidNavigator = Trk__Navigator(
            name='MuidNavigator',
            TrackingGeometrySvc=svcMgr.AtlasTrackingGeometrySvc)
        ToolSvc += MuidNavigator

        from TrkExTools.TrkExToolsConf import Trk__Extrapolator
        MuidExtrapolator = Trk__Extrapolator(
            name='MuidExtrapolator',
            Propagators=[MuidPropagator],
            MaterialEffectsUpdators=[MuidMaterialUpdator],
            Navigator=MuidNavigator)
        ToolSvc += MuidExtrapolator

        # material allocation
        from TrkiPatFitter.TrkiPatFitterConf import Trk__MaterialAllocator
        MuidMaterialAllocator = Trk__MaterialAllocator(
            name='MuidMaterialAllocator',
            AggregateMaterial=True,
            Extrapolator=MuidExtrapolator,
            TrackingGeometrySvc=svcMgr.AtlasTrackingGeometrySvc)
        ToolSvc += MuidMaterialAllocator

        from TrkiPatFitter.TrkiPatFitterConf import Trk__iPatGlobalFitter
        Fitter = Trk__iPatGlobalFitter(
            name='iPatGlobalFitter',
            #from TrkiPatFitter.TrkiPatFitterConf import Trk__iPatFitter
            #Fitter = Trk__iPatFitter(
            #    name='iPatFitter',
            AggregateMaterial=True,
            AsymmetricCaloEnergy=False,
            FullCombinedFit=True,
            MaterialAllocator=MuidMaterialAllocator,
            OutputLevel=align.OutputLevel())
        #OutputLevel = VERBOSE)

        ToolSvc += Fitter
        self._fitter = ToolSvc.iPatGlobalFitter
        #self._fitter = ToolSvc.iPatFitter

        if align.useSLFitter():
            SLFitter = Trk__iPatGlobalFitter(
                name='iPatGlobalSLFitter',
                #SLFitter = Trk__iPatFitter(
                #    name                    = 'iPatSLFitter',
                AggregateMaterial=True,
                FullCombinedFit=True,
                LineFit=True,
                MaterialAllocator=MuidMaterialAllocator,
                OutputLevel=align.OutputLevel())
            ToolSvc += SLFitter
            self._slfitter = ToolSvc.iPatGlobalSLFitter
#--------------------------------------------------------------

# Number of events to be processed
theApp.EvtMax = 50000
#theApp.EvtMax = 50

ServiceMgr.MessageSvc.OutputLevel             = INFO
ServiceMgr.MessageSvc.defaultLimit            = 10000
ServiceMgr.MessageSvc.Format                  = "% F%37W%S%7W%R%T %0W%M"

################################################################
#  Extrapolation setup
#
# Navigator with Atlasnstruction geometry
from TrkExTools.TrkExToolsConf import Trk__Navigator
ValidationNavigator = Trk__Navigator(name ='ValidationNavigator')
ValidationNavigator.ValidationMode       = True
ValidationNavigator.TrackingGeometrySvc  = JobTrackingGeometrySvc
ToolSvc += ValidationNavigator

# the material mapper
from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__MaterialMapper
ValidationMaterialMapper    = Trk__MaterialMapper(name ='MaterialMapper')
ValidationMaterialMapper.TrackingVolumeValidation  = True
ValidationMaterialMapper.DetailedLayerValidation   = True
ValidationMaterialMapper.DetailedSurfaceValidation = False
ToolSvc += ValidationMaterialMapper

# The standard material effects updator
from TrkExTools.TrkExToolsConf import Trk__DummyMaterialEffectsUpdator
ValidationMaterialUpdator                   = Trk__DummyMaterialEffectsUpdator(name='ValidationMaterialUpdator')
Esempio n. 15
0
# switch to the rigth CoolDB folder 
AtlasTrackingGeometrySvc.InputLayerMaterialSetName = CoolDataBaseFolder

from AthenaCommon.AppMgr import ServiceMgr as svcMgr
svcMgr += AtlasTrackingGeometrySvc

print '* [ Configuration : start ] *** AtlasTrackingGeometry ********************************'
print '* [ TrackingGeometrySvc   ]'
print AtlasTrackingGeometrySvc
print '* [ GeometryBuilder       ]'
print AtlasGeometryBuilder
print '* [ Configuration : end   ] *** AtlasTrackingGeometry ********************************'

# the navigator Configurable way
from TrkExTools.TrkExToolsConf import Trk__Navigator
CombinedNavigator = Trk__Navigator( name = 'CombinedNavigator',
                                    TrackingGeometrySvc = AtlasTrackingGeometrySvc )
ToolSvc += CombinedNavigator
print      CombinedNavigator


# PROPAGATOR DEFAULTS --------------------------------------------------------------------------------------

AtlasPropagators  = []

from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as RkPropagator
AtlasRungeKuttaPropagator = RkPropagator(name = 'AtlasRungeKuttaPropagator')
ToolSvc += AtlasRungeKuttaPropagator

AtlasPropagators += [AtlasRungeKuttaPropagator]

from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator
Esempio n. 16
0
#
from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator
#
ElectronTrkPropagator = Propagator(name='ElectronTrkPropagator')
ElectronTrkPropagator.AccuracyParameter = 0.0001
ToolSvc += ElectronTrkPropagator

from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as StepPropagator
ElectronTrkStepPropagator = StepPropagator(name='ElectronTrkStepPropagator')
ToolSvc += ElectronTrkStepPropagator
#
# Setup the Navigator (default, could be removed)
#
from TrkExTools.TrkExToolsConf import Trk__Navigator
ElectronTrkNavigator = Trk__Navigator(
    name='ElectronTrkNavigator',
    #TrackingGeometrySvc = AtlasTrackingGeometrySvc
)
ToolSvc += ElectronTrkNavigator
#
# Setup the MaterialEffectsUpdator
#
from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator
ElectronTrkMaterialUpdator = Trk__MaterialEffectsUpdator(
    name="ElectronTrkMaterialEffectsUpdator")
ToolSvc += ElectronTrkMaterialUpdator

# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE

ElectronTrkSubPropagators = []
ElectronTrkSubUpdators = []
Esempio n. 17
0
def MuonNavigator(name = "MuonNavigator",**kwargs):
    kwargs.setdefault("TrackingGeometrySvc", "AtlasTrackingGeometrySvc")
    from TrkExTools.TrkExToolsConf import Trk__Navigator
    return Trk__Navigator(name,**kwargs)
Esempio n. 18
0
AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc
# get propagator
from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator
#
egTrkPropagator = Propagator(name='egTrkPropagator')
egTrkPropagator.AccuracyParameter = 0.0001
ToolSvc += egTrkPropagator
#
from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as StepPropagator

egTrkStepPropagator = StepPropagator(name='egTrkStepPropagator')
ToolSvc += egTrkStepPropagator
# Setup the Navigator (default)
from TrkExTools.TrkExToolsConf import Trk__Navigator

egTrkNavigator = Trk__Navigator(name='egTrkNavigator')
ToolSvc += egTrkNavigator
# Setup the MaterialEffectsUpdator
from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator

egTrkMaterialUpdator = Trk__MaterialEffectsUpdator(
    name="egTrkMaterialEffectsUpdator")
ToolSvc += egTrkMaterialUpdator
# CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE
egTrkSubPropagators = []
egTrkSubUpdators = []
# -------------------- set it depending on the geometry ----------------------------------------------------
# default for ID is (Rk,Mat)
egTrkSubPropagators += [egTrkPropagator.name()]
egTrkSubUpdators += [egTrkMaterialUpdator.name()]
# default for Calo is (Rk,MatLandau)
Esempio n. 19
0
    name='FatrasMultipleScatteringUpdator')
ToolSvc += FatrasMultipleScatteringUpdator

# hadronic interaction creator
from FatrasTools.FatrasToolsConf import Fatras__HadIntProcessorParametric
FatrasHadIntProcessor = Fatras__HadIntProcessorParametric(
    name='FatrasadIntProcessor')
#FatrasHadIntProcessor.MinimumHadronicOutEnergy       = FatrasTuningFlags.HadronicInteractionMinMomentumOut()
#FatrasHadIntProcessor.HadronicInteractionValidation  = FatrasValidationFlags.HadronicInteractions()
ToolSvc += FatrasHadIntProcessor

##############################################################################################################################
# The extrapolator for the ID simulation
# the Navigator
include('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py')
FatrasNavigator = Navigator(name='FatrasNavigatorID')
FatrasNavigator.TrackingGeometrySvc = AtlasTrackingGeometrySvc
ToolSvc += FatrasNavigator
# Updator for Fatras - MC or Fatras
from FatrasTools.FatrasToolsConf import Fatras__McMaterialEffectsUpdator
FatrasMaterialUpdator = Fatras__McMaterialEffectsUpdator(
    name='FatrasMaterialUpdatorID')
# hadronic interactions
FatrasMaterialUpdator.HadronicInteractionProcessor = FatrasHadIntProcessor
ToolSvc += FatrasMaterialUpdator
# energy loss
FatrasMaterialUpdator.EnergyLoss = True
FatrasMaterialUpdator.EnergyLossUpdator = FatrasEnergyLossUpdator
# mutiple scattering
FatrasMaterialUpdator.MultipleScattering = True
FatrasMaterialUpdator.MultipleScatteringUpdator = FatrasMultipleScatteringUpdator