def __init__(self, name="TrigAmbiguitySolver_Electron_EF", type="electron", lowPt=False): super(InDet__InDetTrigAmbiguitySolver, self).__init__(name) slice = type if name.find('FTK') > -1: slice = 'FTK' from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, \ InDetTrigTrackFitter, InDetTrigExtrapolator, InDetTrigTrackSummaryTool, \ InDetTrigTRTDriftCircleCut # load InnerDetector TrackSelectionTool # from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetAmbiScoringTool #ptint ptintcut = InDetTrigSliceSettings[('pTmin', slice)] if slice == 'minBias': ptintcut = 0.95 * InDetTrigSliceSettings[('pTmin', slice)] elif slice == 'minBias400': ptintcut = 0.95 * InDetTrigSliceSettings[('pTmin', slice)] InDetTrigScoringTool = InDet__InDetAmbiScoringTool( name='InDetTrigScoringTool_' + slice, Extrapolator=InDetTrigExtrapolator, SummaryTool=InDetTrigTrackSummaryTool, useAmbigFcn=True, # this is NewTracking useTRT_AmbigFcn=False, #to have a steeper turn-n curve minPt=ptintcut, maxRPhiImp=InDetTrigCutValues.maxPrimaryImpact(), maxZImp=InDetTrigCutValues.maxZImpact(), maxEta=InDetTrigCutValues.maxEta(), minSiClusters=InDetTrigCutValues.minClusters(), maxSiHoles=InDetTrigCutValues.maxHoles(), maxPixelHoles=InDetTrigCutValues.maxPixelHoles(), maxSCTHoles=InDetTrigCutValues.maxSCTHoles(), maxDoubleHoles=InDetTrigCutValues.maxDoubleHoles(), usePixel=InDetTrigCutValues.usePixel(), useSCT=InDetTrigCutValues.useSCT(), minTRTonTrk=0, # no TRT here DriftCircleCutTool=InDetTrigTRTDriftCircleCut, doEmCaloSeed=False, #BeamPositionSvc = default instance , ) if slice == 'beamgas': InDetTrigScoringTool.minPt = EFIDTrackingCutsBeamGas.minPT() InDetTrigScoringTool.maxRPhiImp = EFIDTrackingCutsBeamGas.maxPrimaryImpact( ) InDetTrigScoringTool.maxZImp = EFIDTrackingCutsBeamGas.maxZImpact() InDetTrigScoringTool.minSiClusters = EFIDTrackingCutsBeamGas.minClusters( ) InDetTrigScoringTool.maxSiHoles = EFIDTrackingCutsBeamGas.maxHoles( ) InDetTrigScoringTool.useTRT_AmbigFcn = False InDetTrigScoringTool.useSigmaChi2 = True if slice == 'FTK' or slice == 'FTKRefit' or slice == 'FTKMon': InDetTrigScoringTool.minSiClusters = FTKTrackingCuts.minClusters() InDetTrigScoringTool.maxSiHoles = FTKTrackingCuts.maxHoles() InDetTrigScoringTool.maxPixelHoles = FTKTrackingCuts.maxPixelHoles( ) InDetTrigScoringTool.maxSCTHoles = FTKTrackingCuts.maxSCTHoles() InDetTrigScoringTool.maxDoubleHoles = FTKTrackingCuts.maxDoubleHoles( ) # ToolSvc += InDetTrigScoringTool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigScoringTool # load Ambiguity Processor from InDetTrigRecExample.InDetTrigConfigRecLoadTools import \ InDetTrigAmbiTrackSelectionTool from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__SimpleAmbiguityProcessorTool InDetTrigAmbiguityProcessor = \ Trk__SimpleAmbiguityProcessorTool(name = 'InDetTrigAmbiguityProcessor_'+slice, #AssoTool = InDetTrigPrdAssociationTool, Fitter = InDetTrigTrackFitter, SelectionTool = InDetTrigAmbiTrackSelectionTool, RefitPrds = not InDetTrigFlags.refitROT() ) InDetTrigAmbiguityProcessor.ScoringTool = InDet__InDetAmbiScoringTool( 'InDetTrigScoringTool_' + slice) if slice == 'beamgas': from InDetTrigRecExample.InDetTrigConfigRecLoadToolsBeamGas import \ InDetTrigAmbiTrackSelectionToolBeamGas InDetTrigAmbiguityProcessor.SelectionTool = InDetTrigAmbiTrackSelectionToolBeamGas elif slice == 'cosmicsN': from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackFitterCosmics from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics \ import InDetTrigScoringToolCosmics_SiPattern, InDetTrigAmbiTrackSelectionToolCosmicsN InDetTrigAmbiguityProcessor.Fitter = InDetTrigTrackFitterCosmics InDetTrigAmbiguityProcessor.SuppressHoleSearch = False InDetTrigAmbiguityProcessor.SelectionTool = InDetTrigAmbiTrackSelectionToolCosmicsN InDetTrigAmbiguityProcessor.ScoringTool = InDetTrigScoringToolCosmics_SiPattern #InDetTrigAmbiguityProcessor.SuppressTrackFit = True #InDetTrigAmbiguityProcessor.ForceRefit = False InDetTrigAmbiguityProcessor.RefitPrds = False elif slice == 'electron' and InDetTrigFlags.doBremRecovery(): InDetTrigAmbiguityProcessor.tryBremFit = True import AthenaCommon.SystemOfUnits as Units InDetTrigAmbiguityProcessor.pTminBrem = 5 * Units.GeV elif slice == 'FTK' or slice == 'FTKRefit' or slice == 'FTKMon': from TrigInDetConf.TrigInDetRecToolsFTK import InDetTrigAmbiTrackSelectionToolFTK, InDetTrigTrackFitterFTK InDetTrigAmbiguityProcessor.SelectionTool = InDetTrigAmbiTrackSelectionToolFTK InDetTrigAmbiguityProcessor.Fitter = InDetTrigTrackFitterFTK #InDetTrigAmbiguityProcessor.RefitPrds = if InDetTrigFlags.materialInteractions() and InDetTrigFlags.solenoidOn( ): InDetTrigAmbiguityProcessor.MatEffects = 3 else: InDetTrigAmbiguityProcessor.MatEffects = 0 ToolSvc += InDetTrigAmbiguityProcessor if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigAmbiguityProcessor self.AmbiguityProcessor = InDetTrigAmbiguityProcessor if lowPt: from InDetTrigRecExample.InDetTrigConfigRecLoadToolsLowPt import InDetTrigAmbiguityProcessorLowPt self.AmbiguityProcessor = InDetTrigAmbiguityProcessorLowPt self.OutputTracksLabel = "AmbigSolvLowPt" #use either SPSeeded or FTF tracks self.InputTracksLabel = "" #FIX #InDetTrigExtrapolator.ApplyMaterialEffects = False #monitoring from InDetTrigAmbiguitySolver.InDetTrigAmbiguitySolverMonitoring import InDetTrigAmbiguitySolverValidationMonitor from InDetTrigAmbiguitySolver.InDetTrigAmbiguitySolverMonitoring import InDetTrigAmbiguitySolverOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig ambtime = TrigTimeHistToolConfig("AmbTime") ambtime.TimerHistLimits = [0, 100] if InDetTrigSliceSettings[('doFullScan', slice)]: ambtime.TimerHistLimits = [0, 500] self.AthenaMonTools = [ InDetTrigAmbiguitySolverValidationMonitor(), InDetTrigAmbiguitySolverOnlineMonitor(), ambtime ]
def __init__(self, name="TrigExtProcessor_Electron_EF", type="electron"): super(InDet__InDetTrigExtensProcessor, self).__init__(name) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackFitter, InDetTrigPatternUpdator, InDetTrigExtrapolator, InDetTrigTrackSummaryTool if InDetTrigFlags.trtExtensionType() is 'DAF': # DAF Fitter setup # from TrkCompetingRIOsOnTrackTool.TrkCompetingRIOsOnTrackToolConf import Trk__CompetingRIOsOnTrackTool InDetTrigCompetingRotCreator = \ Trk__CompetingRIOsOnTrackTool( name = 'InDetTrigCompetingRotCreator', ToolForCompPixelClusters = None, # default ToolForCompSCT_Clusters = None, # default ToolForCompTRT_DriftCircles = InDetTrigCompetingTRT_DC_Tool ) ToolSvc += InDetTrigCompetingRotCreator if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigCompetingRotCreator from TrkDeterministicAnnealingFilter.TrkDeterministicAnnealingFilterConf import Trk__DeterministicAnnealingFilter InDetTrigExtensionFitter = \ Trk__DeterministicAnnealingFilter (name = 'InDetTrigDAF', ToolForExtrapolation = InDetTrigExtrapolator, ToolForCompetingROTsCreation = InDetTrigCompetingRotCreator, ToolForUpdating = InDetTrigPatternUpdator, AnnealingScheme = [200., 81., 9., 4., 1., 1., 1.], DropOutlierCutValue = 1.E-7, OutlierCutValue = 0.01 ) ToolSvc += InDetTrigExtensionFitter if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigExtensionFitter else: if type == "cosmicsN": from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackFitterCosmics InDetTrigExtensionFitter = InDetTrigTrackFitterCosmics else: from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackFitter InDetTrigExtensionFitter = InDetTrigTrackFitter ToolSvc += InDetTrigExtensionFitter if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigExtensionFitter # get configured track extension processor #----------------------------------------------------------------------- from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings from InDetTrigRecExample.InDetTrigConfigRecLoadTools import \ InDetTrigTRTDriftCircleCut from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetAmbiScoringTool InDetTrigExtScoringTool = InDet__InDetAmbiScoringTool( name='InDetTrigExtScoringTool_' + type, Extrapolator=InDetTrigExtrapolator, SummaryTool=InDetTrigTrackSummaryTool, useAmbigFcn=True, # this is NewTracking #minPt = InDetTrigCutValues.minPT(), #see below maxRPhiImp=InDetTrigCutValues.maxPrimaryImpact(), maxZImp=InDetTrigCutValues.maxZImpact(), maxEta=InDetTrigCutValues.maxEta(), minSiClusters=InDetTrigCutValues.minClusters(), maxSiHoles=InDetTrigCutValues.maxHoles(), maxDoubleHoles=InDetTrigCutValues.maxDoubleHoles(), usePixel=InDetTrigCutValues.usePixel(), useSCT=InDetTrigCutValues.useSCT(), doEmCaloSeed=False, minTRTonTrk=InDetTrigCutValues.minTRTonTrk(), #useSigmaChi2 = False # tuning from Thijs DriftCircleCutTool=InDetTrigTRTDriftCircleCut, ) InDetTrigExtScoringTool.minPt = InDetTrigSliceSettings[('pTmin', type)] # ToolSvc += InDetTrigExtScoringTool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigExtScoringTool if type == "cosmicsN": from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import InDetTrigTrackSummaryToolCosmics from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetCosmicScoringTool InDetTrigScoringToolCosmics_TRT= \ InDet__InDetCosmicScoringTool(name = 'InDetTrigCosmicScoringTool_TRT', nWeightedClustersMin = 0, minTRTHits = EFIDTrackingCutsCosmics.minTRTonTrk(), SummaryTool= InDetTrigTrackSummaryToolCosmics ) ToolSvc += InDetTrigScoringToolCosmics_TRT if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigScoringToolCosmics_TRT self.TrackFitter = InDetTrigExtensionFitter self.ScoringTool = InDet__InDetAmbiScoringTool( 'InDetTrigExtScoringTool_' + type) self.RefitPrds = not (InDetTrigFlags.refitROT() or (InDetTrigFlags.trtExtensionType() is 'DAF')) self.suppressHoleSearch = False # does not work properly if type == "cosmicsN": self.ScoringTool = InDetTrigScoringToolCosmics_TRT self.Cosmics = True #Material effects if InDetTrigFlags.materialInteractions(): self.matEffects = 3 # default in code is 4!! else: self.matEffects = 0 if type == "cosmicsN" and not InDetTrigFlags.solenoidOn(): self.matEffects = 0 #monitoring from InDetTrigExtensProcessor.InDetTrigExtensProcessorMonitoring import InDetTrigExtensProcessorValidationMonitor from InDetTrigExtensProcessor.InDetTrigExtensProcessorMonitoring import InDetTrigExtensProcessorOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig idexttime = TrigTimeHistToolConfig("IdExtTime") idexttime.TimerHistLimits = [0, 200] self.AthenaMonTools = [ InDetTrigExtensProcessorValidationMonitor(), InDetTrigExtensProcessorOnlineMonitor(), idexttime ]
def __init__(self, name="TRTSeededTrigAmbiguitySolver_Electron_EF", type="electron"): super(InDet__InDetTrigAmbiguitySolver, self).__init__(name) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, InDetTrigTrackFitter, InDetTrigExtrapolator, InDetTrigTrackSummaryTool, InDetTrigTRTDriftCircleCut from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts InDetTrigCutValues = EFIDTrackingCuts # load InnerDetector TrackSelectionTool # from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetAmbiTrackSelectionTool TRTSeededInDetTrigAmbiTrackSelectionTool = InDet__InDetAmbiTrackSelectionTool( name='TRTSeededInDetTrigAmbiTrackSelectionTool', DriftCircleCutTool=InDetTrigTRTDriftCircleCut, AssociationTool=TrackingCommon. getInDetTrigPRDtoTrackMapToolGangedPixels(), minScoreShareTracks=-1., # off ! minHits=InDetTrigCutValues.minSecondaryClusters(), minNotShared=InDetTrigCutValues.minSecondarySiNotShared(), maxShared=InDetTrigCutValues.maxSecondaryShared(), minTRTHits=InDetTrigCutValues.minSecondaryTRTonTrk(), UseParameterization=InDetTrigCutValues.useParameterizedTRTCuts()) ToolSvc += TRTSeededInDetTrigAmbiTrackSelectionTool if (InDetTrigFlags.doPrintConfigurables()): print(TRTSeededInDetTrigAmbiTrackSelectionTool) from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetAmbiScoringTool TRTSeededInDetTrigScoringTool = InDet__InDetAmbiScoringTool( name='TRTSeededInDetTrigScoringTool_' + type, Extrapolator=InDetTrigExtrapolator, DriftCircleCutTool=InDetTrigTRTDriftCircleCut, SummaryTool=InDetTrigTrackSummaryTool, useTRT_AmbigFcn=True, useAmbigFcn=False, maxRPhiImp=InDetTrigCutValues.maxSecondaryImpact(), maxZImp=InDetTrigCutValues.maxZImpact(), maxEta=InDetTrigCutValues.maxEta(), minSiClusters=InDetTrigCutValues.minSecondaryClusters(), maxSiHoles=InDetTrigCutValues.maxSecondaryHoles(), maxPixelHoles=InDetTrigCutValues.maxSecondaryPixelHoles(), maxSCTHoles=InDetTrigCutValues.maxSecondarySCTHoles(), maxDoubleHoles=InDetTrigCutValues.maxSecondaryDoubleHoles(), usePixel=InDetTrigCutValues.usePixel(), useSCT=InDetTrigCutValues.useSCT(), minTRTonTrk=InDetTrigCutValues.minSecondaryTRTonTrk(), doEmCaloSeed=False, #useSigmaChi2 = False ) TRTSeededInDetTrigScoringTool.minPt = InDetTrigSliceSettings[('pTmin', type)] # ToolSvc += TRTSeededInDetTrigScoringTool if (InDetTrigFlags.doPrintConfigurables()): print(TRTSeededInDetTrigScoringTool) # load Ambiguity Processor # from TrkAmbiguityProcessor.TrkAmbiguityProcessorConf import Trk__SimpleAmbiguityProcessorTool TRTSeededInDetTrigAmbiguityProcessor = Trk__SimpleAmbiguityProcessorTool( name='TRTSeededInDetTrigAmbiguityProcessor', Fitter=InDetTrigTrackFitter, AssociationTool=TrackingCommon. getInDetTrigPRDtoTrackMapToolGangedPixels(), TrackSummaryTool=InDetTrigTrackSummaryTool, SelectionTool=TRTSeededInDetTrigAmbiTrackSelectionTool, RefitPrds=not InDetTrigFlags.refitROT(), SuppressTrackFit=False, SuppressHoleSearch=False, ScoringTool=TRTSeededInDetTrigScoringTool) if InDetTrigFlags.materialInteractions(): TRTSeededInDetTrigAmbiguityProcessor.MatEffects = InDetTrigFlags.materialInteractionsType( ) else: TRTSeededInDetTrigAmbiguityProcessor.MatEffects = 0 ToolSvc += TRTSeededInDetTrigAmbiguityProcessor if (InDetTrigFlags.doPrintConfigurables()): print(TRTSeededInDetTrigAmbiguityProcessor) self.AmbiguityProcessor = TRTSeededInDetTrigAmbiguityProcessor self.InputTracksLabel = 'TRTSeededTracks' self.OutputTracksLabel = 'TRTSeededAmbigSolv' #monitoring from InDetTrigAmbiguitySolver.InDetTrigAmbiguitySolverMonitoring import InDetTrigAmbiguitySolverValidationMonitor from InDetTrigAmbiguitySolver.InDetTrigAmbiguitySolverMonitoring import InDetTrigAmbiguitySolverOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig ambtime = TrigTimeHistToolConfig("AmbTime") ambtime.TimerHistLimits = [0, 200] self.AthenaMonTools = [ InDetTrigAmbiguitySolverValidationMonitor(), InDetTrigAmbiguitySolverOnlineMonitor(), ambtime ]