def __init__(self, name='NIMatEffUpdator'): # get defaut material updator from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator MaterialEffectsUpdator = Trk__MaterialEffectsUpdator( name='MaterialEffectsUpdator') ToolSvc += MaterialEffectsUpdator # call the base class constructor Trk__NIMatEffUpdator.__init__(self,name,\ MaterialEffectsUpdator = MaterialEffectsUpdator )
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
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) egTrkSubPropagators += [egTrkPropagator.name()] egTrkSubUpdators += [egTrkMaterialUpdator.name()] # default for MS is (STEP,Mat) egTrkSubPropagators += [egTrkStepPropagator.name()] egTrkSubUpdators += [egTrkMaterialUpdator.name()] # ----------------------------------------------------------------------------------------------------------
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 = [] # -------------------- set it depending on the geometry ---------------------------------------------------- # default for ID is (Rk,Mat) ElectronTrkSubPropagators += [ElectronTrkPropagator.name()] ElectronTrkSubUpdators += [ElectronTrkMaterialUpdator.name()] # default for Calo is (Rk,MatLandau) ElectronTrkSubPropagators += [ElectronTrkPropagator.name()] ElectronTrkSubUpdators += [ElectronTrkMaterialUpdator.name()]
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 if InDetFlags.doPrintConfigurables: print InDetMaterialUpdator # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE InDetSubPropagators = [] InDetSubUpdators = [] # -------------------- set it depending on the geometry ----------------------------------------------------
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
############################################################################### ############################################################################### ## jobOptions ############################################################################### if not 'doMEOTP' in dir(): doMEOTP = False ### Setup extrapolator ### if (doMEOTP): ### Configure Material Effects On Track Provider (usually this is not done) ### include( 'CaloMaterialEffectsOnTrackProvider/CaloMaterialEffectsOnTrackProvider.py' ) from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator CaloTrkMuId_MaterialUpdator = Trk__MaterialEffectsUpdator() ToolSvc += CaloTrkMuId_MaterialUpdator from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator CaloTrkMuId_Propagator = Trk__RungeKuttaPropagator() ToolSvc += CaloTrkMuId_Propagator from TrkExTools.AtlasExtrapolator import AtlasExtrapolator CaloTrkMuIdTools_Extrapolator = AtlasExtrapolator( name='CaloTrkMuIdTools_Extrapolator') CaloTrkMuIdTools_Extrapolator.DoCaloDynamic = True CaloTrkMuIdTools_Extrapolator.Propagators = [CaloTrkMuIdTools_Propagator] CaloTrkMuIdTools_Extrapolator.MaterialEffectsUpdator = CaloTrkMuIdTools_MaterialUpdator else: ### Use the public AtlasExtrapolator ###
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 # assign it to the Extrapolator from TrkExTools.TrkExToolsConf import Trk__Extrapolator MuonTGExtrapolator = Trk__Extrapolator( name = 'MuonTGExtrapolator', Propagators = [ MuonTGPropagator ], Navigator = MuonTGNavigator, MaterialEffectsUpdators = [ MuonTGMaterialUpdator ]
# set up the extrapolator and fitter as used by iPatRec #from TrkExRungeKuttaIntersector.TrkExRungeKuttaIntersectorConf import \ # Trk__IntersectorWrapper as Propagator from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import \ Trk__RungeKuttaPropagator as Propagator iPatPropagator = Propagator(name='iPatPropagator', AccuracyParameter=0.0001) ToolSvc += iPatPropagator from TrkExTools.TrkExToolsConf import Trk__Navigator iPatNavigator = Trk__Navigator( name='iPatNavigator', TrackingGeometrySvc=AtlasTrackingGeometrySvc) ToolSvc += iPatNavigator from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator iPatMaterialUpdator = Trk__MaterialEffectsUpdator( name="iPatMaterialEffectsUpdator") ToolSvc += iPatMaterialUpdator from TrkExTools.TrkExToolsConf import Trk__Extrapolator iPatExtrapolator = Trk__Extrapolator( name='iPatExtrapolator', MaterialEffectsUpdators=[iPatMaterialUpdator], Propagators=[iPatPropagator], Navigator=iPatNavigator, Tolerance=0.0011) ToolSvc += iPatExtrapolator from TrkiPatFitter.TrkiPatFitterConf import Trk__MaterialAllocator iPatMaterialAllocator = Trk__MaterialAllocator( name='iPatMaterialAllocator', #AggregateMaterial = True,
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
def __init__(self, name='TimedExtrapolator'): # 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.TimedPropagators = [] from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as RkPropagator AtlasRungeKuttaPropagator = RkPropagator( name='AtlasRungeKuttaPropagator') ToolSvc += AtlasRungeKuttaPropagator self.TimedPropagators += [AtlasRungeKuttaPropagator] from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator AtlasSTEP_Propagator = STEP_Propagator(name='AtlasSTEP_Propagator') ToolSvc += AtlasSTEP_Propagator self.TimedPropagators += [AtlasSTEP_Propagator] # UPDATOR DEFAULTS ----------------------------------------------------------------------------------------- from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator MaterialEffectsUpdator = Trk__MaterialEffectsUpdator( name='MaterialEffectsUpdator') ToolSvc += MaterialEffectsUpdator self.TimedUpdators = [] from TrkExTools.TrkExToolsConf import Trk__NIMatEffUpdator as NIMatEffUpdator NIMatEffUpdator = NIMatEffUpdator(name='NIMatEffUpdator') ToolSvc += NIMatEffUpdator self.TimedUpdators += [NIMatEffUpdator] # 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 TimedSubPropagators = [] TimedSubUpdators = [] # -------------------- set it depending on the geometry ---------------------------------------------------- # default for Global is (Rk,Mat) TimedSubPropagators += [AtlasRungeKuttaPropagator.name()] TimedSubUpdators += [MaterialEffectsUpdator.name()] # default for ID is (Rk,Mat) TimedSubPropagators += [AtlasRungeKuttaPropagator.name()] TimedSubUpdators += [MaterialEffectsUpdator.name()] # default for BeamPipe is (Rk,Mat) TimedSubPropagators += [AtlasRungeKuttaPropagator.name()] TimedSubUpdators += [MaterialEffectsUpdator.name()] # default for Calo is (STEP,Mat) TimedSubPropagators += [AtlasSTEP_Propagator.name()] TimedSubUpdators += [NIMatEffUpdator.name()] # default for MS is (STEP,Mat) TimedSubPropagators += [AtlasSTEP_Propagator.name()] TimedSubUpdators += [MaterialEffectsUpdator.name()] # default for Cavern is (Rk,Mat) TimedSubPropagators += [AtlasRungeKuttaPropagator.name()] TimedSubUpdators += [MaterialEffectsUpdator.name()] # ---------------------------------------------------------------------------------------------------------- # call the base class constructor Trk__TimedExtrapolator.__init__(self,name,\ Navigator = AtlasNavigator,\ MaterialEffectsUpdators = self.TimedUpdators,\ Propagators = self.TimedPropagators,\ SubPropagators = TimedSubPropagators,\ SubMEUpdators = TimedSubUpdators,\ DoCaloDynamic = False )
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 # from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator LocalPropagator = Propagator(name='LocalPropagator') ToolSvc += LocalPropagator print LocalPropagator # # create extrapolator # from TrkExTools.TrkExToolsConf import Trk__Extrapolator
MyExtrapolator.StopWithNavigationBreak = True MyExtrapolator.DoCaloDynamic = False MyExtrapolator.MaterialEffectsOnTrackValidation = True MyExtrapolator.RequireMaterialDestinationHit = False MyExtrapolator.setEnergyLoss(True) # fix from TrkExTools.TrkExToolsConf import Trk__EnergyLossUpdator MyEnergyLossUpdator = Trk__EnergyLossUpdator(name='TestEnergyLossUpdator') #MyEnergyLossUpdator.UseFix = False MyEnergyLossUpdator.OutputLevel = VERBOSE print MyEnergyLossUpdator ToolSvc += MyEnergyLossUpdator from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator MyMaterialEffectsUpdator = Trk__MaterialEffectsUpdator( name='TestMaterialEffectsUpdator') #MyMaterialEffectsUpdator.MostProbableEnergyLoss = True MyMaterialEffectsUpdator.EnergyLossUpdator = MyEnergyLossUpdator print MyMaterialEffectsUpdator ToolSvc += MyMaterialEffectsUpdator #MyExtrapolator.EnergyLossUpdators = [ MyEnergyLossUpdator ] MyExtrapolator.MaterialEffectsUpdators = [MyMaterialEffectsUpdator] # proposal by Niels MyExtrapolator.Tolerance = 0.0011 #from TrkExTools.TrkExToolsConf import Trk__Navigator MyNavigator = Navigator(name='TestNavigator') MyNavigator.OutputLevel = INFO ToolSvc += MyNavigator