def initConfigTool(self, instanceName): "Init configuration conditions tool" # Set up SCT cabling from AthenaCommon.Include import include include('InDetRecExample/InDetRecCabling.py') from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from IOVDbSvc.CondDB import conddb if conddb.dbdata == "COMP200" or InDetTrigFlags.ForceCoraCool(): sctdaqpath = '/SCT/DAQ/Configuration' else: sctdaqpath = '/SCT/DAQ/Config' if InDetTrigFlags.ForceCoolVectorPayload(): sctdaqpath = '/SCT/DAQ/Config' from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup( ) sct_ConfigurationConditionsToolSetup.setChannelFolder(sctdaqpath + "/Chip") sct_ConfigurationConditionsToolSetup.setModuleFolder(sctdaqpath + "/Module") sct_ConfigurationConditionsToolSetup.setMurFolder(sctdaqpath + "/MUR") sct_ConfigurationConditionsToolSetup.setToolName(instanceName) sct_ConfigurationConditionsToolSetup.setup() configTool = sct_ConfigurationConditionsToolSetup.getTool() if self._print: print(configTool) if not (configTool.getFullName() in self.summaryTool.ConditionsTools): self.summaryTool.ConditionsTools += [configTool.getFullName()] if self._print: print(self.condDB) return configTool
def __init__(self, name = "ConfiguredOnlineSpacePointProviderTool", doBS = True) : OnlineSpacePointProviderTool.__init__(self, name) self.UseStoreGate = False self.DoBS_Conversion = doBS from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags InDetL2TrigClusterMakerTool = InDet__ClusterMakerTool( name = "InDetL2TrigClusterMakerTool", UsePixelCalibCondDB = False, PixelOfflineCalibSvc = PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'), ) ToolSvc += InDetL2TrigClusterMakerTool InDetL2TrigMergedPixelsTool = InDet__MergedPixelsTool( name = "InDetL2TrigMergedPixelsTool", globalPosAlg = InDetL2TrigClusterMakerTool, UseSpecialPixelMap = False, PixelConditionsSummarySvc = PixelConditionsSetup.instanceName('PixelConditionsSummarySvc'), ) from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup InDetL2TrigSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetL2TrigSCT_ClusteringTool", globalPosAlg = InDetL2TrigClusterMakerTool, conditionsService = SCT_ConditionsSetup.instanceName("InDetSCT_ConditionsSummarySvc"), ) if InDetTrigFlags.doSCTIntimeHits(): if InDetTrigFlags.InDet25nsec(): InDetL2TrigSCT_ClusteringTool.timeBins = "01X" else: InDetL2TrigSCT_ClusteringTool.timeBins = "X1X" ToolSvc += InDetL2TrigMergedPixelsTool ToolSvc += InDetL2TrigSCT_ClusteringTool ConfiguredPixelClusterCacheTool = PixelClusterCacheTool(PixelClusteringTool=InDetL2TrigMergedPixelsTool) ConfiguredSCT_ClusterCacheTool = SCT_ClusterCacheTool(SCT_ClusteringTool = InDetL2TrigSCT_ClusteringTool, SCT_ByteStreamErrorsSvc= SCT_ConditionsSetup.instanceName("InDetSCT_ByteStreamErrorsSvc"), ) if not self.DoBS_Conversion : ConfiguredPixelClusterCacheTool.RDO_ContainerName = "PixelRDOs" ConfiguredSCT_ClusterCacheTool.RDO_ContainerName = "SCT_RDOs" ConfiguredPixelClusterCacheTool.DoBS_Conversion = False ConfiguredSCT_ClusterCacheTool.DoBS_Conversion = False ToolSvc += ConfiguredPixelClusterCacheTool ToolSvc += ConfiguredSCT_ClusterCacheTool self.PixelClusterCacheTool = ConfiguredPixelClusterCacheTool self.SctClusterCacheTool = ConfiguredSCT_ClusterCacheTool
def __init__(self, name="TrigTRTSegFinder_eGamma"): from AthenaCommon.AppMgr import ToolSvc TrigTRTSegFinder.__init__(self, name) self.RoIhalfWidthDeltaPhi = 0.1 self.RoIhalfWidthDeltaEta = 0.1 self.pTmin = 1000. # self.PropagatorTool = "Trk::RungeKuttaPropagator" # self.MagneticTool = "Trk::MagneticFieldTool_xk" from TrigOfflineDriftCircleTool.TrigOfflineDriftCircleTool_Config import ConfiguredTrigTRT_DriftCircleProviderTool self.TrigDriftCircleProvider = ConfiguredTrigTRT_DriftCircleProviderTool from TRT_TrackExtensionTool_xk.TRT_TrackExtensionTool_xkConf import InDet__TRT_TrackExtensionTool_xk from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTRTDriftCircleCut, \ InDetTrigPatternPropagator,InDetTrigPatternUpdator from InDetTrigRecExample.InDetTrigConfigRecLoadToolsBack import InDetTrigTRTDetElementsRoadMaker from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts InDetTrigCutValues = EFIDTrackingCuts InDetL2TRTExtensionTool = InDet__TRT_TrackExtensionTool_xk( name='InDetL2TRTExtensionTool', TRT_ClustersContainer='Trig_OfflineDriftCircles', DriftCircleCutTool=InDetTrigTRTDriftCircleCut, TrtManagerLocation='TRT', # default PropagatorTool=InDetTrigPatternPropagator, UpdatorTool=InDetTrigPatternUpdator, UseDriftRadius=not InDetTrigFlags.noTRTTiming(), RoadTool=InDetTrigTRTDetElementsRoadMaker, MinNumberDriftCircles=InDetTrigCutValues.minTRTonTrk(), ScaleHitUncertainty=2., RoadWidth=20., UseParameterization=InDetTrigCutValues.useParameterizedTRTCuts()) ToolSvc += InDetL2TRTExtensionTool self.TrackExtensionTool = ToolSvc.InDetL2TRTExtensionTool # print InDetL2TRTExtensionTool from TRT_TrackSegmentsTool_xk.TRT_TrackSegmentsTool_xkConf import InDet__TRT_TrackSegmentsMaker_ATLxk InDetL2_TRT_TrackSegmentsMaker = InDet__TRT_TrackSegmentsMaker_ATLxk( name='InDetL2_TRT_TrackSegmentsMaker', TrtManagerLocation="TRT", pTmin=self.pTmin, TRT_ClustersContainer="Trig_OfflineDriftCircles", PropagatorTool=InDetTrigPatternPropagator, AssosiationTool=None, TrackExtensionTool=InDetL2TRTExtensionTool, UseAssosiationTool=False, MinNumberDriftCircles=InDetTrigCutValues.minTRTonly(), RemoveNoiseDriftCircles=InDetTrigFlags.removeTRTNoise()) ToolSvc += InDetL2_TRT_TrackSegmentsMaker self.SegmentsMakerTool = ToolSvc.InDetL2_TRT_TrackSegmentsMaker # print InDetL2_TRT_TrackSegmentsMaker # monitoring histograms self.AthenaMonTools = [ time, TrigTRTSegFinder_ValidationMonitoring(), TrigTRTSegFinder_OnlineMonitoring() ]
def __init__(self, name="SiTrigSpacePointFinder_Electron_EF", type="electron", lowPt=False): super(InDet__SiTrigSpacePointFinder, self).__init__(name) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigConfigRecLoadTools import \ InDetTrigSiSpacePointMakerTool,SCT_TrigSpacePointTool from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if (InDetTrigFlags.doPrintConfigurables()): print(SCT_TrigSpacePointTool) ToolSvc += SCT_TrigSpacePointTool # Condition algorithm for SiTrigSpacePointFinder from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "InDetSiElementPropertiesTableCondAlg"): from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiElementPropertiesTableCondAlg condSeq += InDet__SiElementPropertiesTableCondAlg( name="InDetSiElementPropertiesTableCondAlg") self.SiSpacePointMakerTool = InDetTrigSiSpacePointMakerTool self.SCTSpacePointTrigHelperTool = SCT_TrigSpacePointTool self.ProcessPixels = True self.ProcessSCTs = True self.ProcessOverlaps = InDetTrigFlags.doOverlapSP() if type == 'cosmicsN': from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import \ InDetTrigSiSpacePointMakerToolCosmics, SCT_TrigSpacePointToolCosmics self.SiSpacePointMakerTool = InDetTrigSiSpacePointMakerToolCosmics self.SCTSpacePointTrigHelperTool = SCT_TrigSpacePointToolCosmics self.SpacePointsSCTName = "SCT_CosmicsTrigSpacePoints" self.SpacePointsPixelName = "PixelCosmicsTrigSpacePoints" from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth', type)] self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth', type)] self.doFullScan = InDetTrigSliceSettings[('doFullScan', type)] #monitoring from SiTrigSpacePointFormation.SiTrigSpacePointFormatMonitoring import SiTrigSpacePointFormatValidationMonitor from SiTrigSpacePointFormation.SiTrigSpacePointFormatMonitoring import SiTrigSpacePointFormatOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig sitime = TrigTimeHistToolConfig("SiTime") sitime.TimerHistLimits = [0, 50] self.AthenaMonTools = [ SiTrigSpacePointFormatValidationMonitor(type=type), SiTrigSpacePointFormatOnlineMonitor(type=type), sitime ]
def __init__(self, name="InDetTrigTrackSlimmer_EF", type="electron"): super(InDet__TrigTrackSlimmer, self).__init__(name) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackSummaryToolSharedHits TrkSlimmingName = "InDetTrigTrackSlimmingTool" keepPars = False keepOut = False if type == "photon" or type == "electron": TrkSlimmingName = "InDetTrigTrackSlimmingToolParams" keepPars = True keepOut = True #slimming tool from TrkTrackSlimmingTool.TrkTrackSlimmingToolConf import Trk__TrackSlimmingTool as ConfigurableTrackSlimmingTool InDetTrkSlimmingTool = \ ConfigurableTrackSlimmingTool(name = TrkSlimmingName, KeepParameters = keepPars, KeepOutliers = keepOut ) ToolSvc += InDetTrkSlimmingTool self.TrackSlimmingTool = InDetTrkSlimmingTool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrkSlimmingTool #optional update of the track summary self.SummaryTool = InDetTrigTrackSummaryToolSharedHits
def __init__(self, name="InDetTrigTrackParticleTruthMaker_Electron_EF", type="electron"): super( InDet__TrigTrackParticleTruthMaker, self ).__init__( name ) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags self.doTruthAss = InDetTrigFlags.doTruth()
def initConfigSvc(self, instanceName): "Init configuration conditions service" if hasattr(self.svcMgr, instanceName): configSvc = getattr(self.svcMgr, instanceName) else: from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConfigurationConditionsSvc configSvc = SCT_ConfigurationConditionsSvc(name=instanceName) self.svcMgr += configSvc if self._print: print configSvc self.summarySvc.ConditionsServices += [instanceName] from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from IOVDbSvc.CondDB import conddb if conddb.dbdata == "COMP200" or InDetTrigFlags.ForceCoraCool(): sctdaqpath = '/SCT/DAQ/Configuration' else: sctdaqpath = '/SCT/DAQ/Config' if InDetTrigFlags.ForceCoolVectorPayload(): sctdaqpath = '/SCT/DAQ/Config' if not self.condDB.folderRequested(sctdaqpath + '/Chip'): self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/Chip', sctdaqpath + '/Chip') if not self.condDB.folderRequested(sctdaqpath + '/Module'): self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/Module', sctdaqpath + '/Module') if not self.condDB.folderRequested(sctdaqpath + '/MUR'): self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/MUR', sctdaqpath + '/MUR') if not self.condDB.folderRequested(sctdaqpath + '/ROD'): self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/ROD', sctdaqpath + '/ROD') if not self.condDB.folderRequested(sctdaqpath + '/RODMUR'): self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/RODMUR', sctdaqpath + '/RODMUR') if not self.condDB.folderRequested(sctdaqpath + '/Geog'): self.condDB.addFolderSplitMC("SCT", sctdaqpath + '/Geog', sctdaqpath + '/Geog') if self._print: print self.condDB return configSvc
def __init__(self, name="InDetTrigPRD_MultiTruthMaker_Electron_EF", type="electron"): super(InDet__PRD_TrigMultiTruthMaker, self).__init__(name) from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags self.doTruthAss = InDetTrigFlags.doTruth() #monitoring from InDetTrigTruthAlgs.PRD_TrigMultiTruthMonitoring import PRD_TrigMultiTruthValidationMonitor from InDetTrigTruthAlgs.PRD_TrigMultiTruthMonitoring import PRD_TrigMultiTruthOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig prdtime = TrigTimeHistToolConfig("PRDTime") prdtime.TimerHistLimits = [0, 200] self.AthenaMonTools = [PRD_TrigMultiTruthValidationMonitor(), prdtime]
def __init__(self, name="InDetTrigDetailedTrackTruthMaker_Electron_EF", type="electron"): super(InDet__InDetTrigDetailedTrackTruthMaker, self).__init__(name) from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags self.doTruthAss = InDetTrigFlags.doTruth() #monitoring from InDetTrigTruthAlgs.InDetTrigDetailedTruthMonitoring import InDetTrigDetailedTruthValidationMonitor from InDetTrigTruthAlgs.InDetTrigDetailedTruthMonitoring import InDetTrigDetailedTruthOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig truthtime = TrigTimeHistToolConfig("TruthTime") truthtime.TimerHistLimits = [0, 200] self.AthenaMonTools = [ InDetTrigDetailedTruthValidationMonitor(), truthtime ]
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
def __init__(self, name = 'ConfiguredTrigL2_InDetRotCreator') : Trk__RIO_OnTrackCreator.__init__(self,name) from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__PixelClusterOnTrackTool from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if InDetTrigFlags.doCommissioning() : myL2_SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool("TrigL2_SCT_ClusterOnTrackTool", CorrectionStrategy = 0, ErrorStrategy = 0) myL2_PixelClusterOnTrackTool = InDet__PixelClusterOnTrackTool("TrigL2_PixelClusterOnTrackTool", PixelOfflineCalibSvc=PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'), ErrorStrategy = 0) else: myL2_SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool("TrigL2_SCT_ClusterOnTrackTool",CorrectionStrategy = 0,ErrorStrategy = 2) myL2_PixelClusterOnTrackTool = InDet__PixelClusterOnTrackTool("TrigL2_PixelClusterOnTrackTool",PixelOfflineCalibSvc=PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'),ErrorStrategy = 1) from AthenaCommon.AppMgr import ToolSvc ToolSvc += myL2_PixelClusterOnTrackTool ToolSvc += myL2_SCT_ClusterOnTrackTool self.Mode='indet' self.ToolPixelCluster = myL2_PixelClusterOnTrackTool self.ToolSCT_Cluster = myL2_SCT_ClusterOnTrackTool
LowGate = 17.1875 * Units.ns HighGate = 45.3125 * Units.ns LowGateArgon = 18.75 * Units.ns HighGateArgon = 43.75 * Units.ns InDetTrigTRT_DriftCircleTool = InDet__TRT_DriftCircleTool( name="InDetTrigTRT_DriftCircleTool", TRTDriftFunctionTool=InDetTrigTRT_DriftFunctionTool, ConditionsSummaryTool=InDetTrigTRTStrawStatusSummaryTool, UseConditionsStatus=True, UseConditionsHTStatus=True, SimpleOutOfTimePileupSupression=False, RejectIfFirstBit=False, # fixes 50 nsec issue MinTrailingEdge=MinTrailingEdge, MaxDriftTime=MaxDriftTime, ValidityGateSuppression=InDetTrigFlags.InDet25nsec(), LowGate=LowGate, HighGate=HighGate, SimpleOutOfTimePileupSupressionArgon=False, # no OOT rejection for argon RejectIfFirstBitArgon=False, # no OOT rejection for argon MinTrailingEdgeArgon=MinTrailingEdge, MaxDriftTimeArgon=MaxDriftTime, ValidityGateSuppressionArgon=InDetTrigFlags.InDet25nsec(), LowGateArgon=LowGateArgon, HighGateArgon=HighGateArgon, useDriftTimeHTCorrection=True, useDriftTimeToTCorrection=True, # reenable ToT ) ToolSvc += InDetTrigTRT_DriftCircleTool log.debug(InDetTrigTRT_DriftCircleTool)
#-------------------------------------------------------------- # Load POOL support, setup for reconstruction #-------------------------------------------------------------- # setup POOL access in ATHENA if 'doReadBS' in dir() and doReadBS: include("InDetTrigRecExample/InDetTrigReadBS_jobOptions.py") else: import AthenaPoolCnvSvc.ReadAthenaPool # --- GeoModel include("AtlasGeoModel/SetGeometryVersion.py") include("AtlasGeoModel/GeoModelInit.py") # ---- Beam Spot service if InDetTrigFlags.useBeamConstraint(): include("InDetBeamSpotService/BeamCondSvc.py") # particle property service include("PartPropSvc/PartPropSvc.py") if InDetTrigFlags.doTruth(): include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py") #------------------------------------------------------------ # Event Data Model Monitor works only in dbg build #------------------------------------------------------------ if doEdmMonitor: from TrkValAlgs.TrkValAlgsConf import Trk__EventDataModelMonitor
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration ## ## @file InDetTrigConfConditionsAccess.py ## @brief Configure conditions access for the ID ## @author [email protected] ## from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if InDetTrigFlags.useConditionsClasses(): _useDCS = False _onlineMode = True _prefix = 'InDetTrig' #_prefix = '' from InDetTrigRecExample.InDetTrigConfigConditions import PixelConditionsSetup PixelConditionsSetup.config(useDCS=_useDCS, onlineMode=_onlineMode, prefix=_prefix) PixelConditionsSetup.lock() PixelConditionsSetup.createSvc() from InDetTrigRecExample.InDetTrigConfigConditions import SCT_ConditionsSetup SCT_ConditionsSetup.config(useDCS=_useDCS, onlineMode=_onlineMode, prefix=_prefix) SCT_ConditionsSetup.lock() SCT_ConditionsSetup.createSvc() from InDetTrigRecExample.InDetTrigConfigConditions import TRT_ConditionsSetup
MaskMiddleHTBit=False, MaskLastHTBit=False, SimpleOutOfTimePileupSupressionArgon=False, # no OOT rejection for argon RejectIfFirstBitArgon=False, # no OOT rejection for argon MinTrailingEdgeArgon=0, # no OOT rejection for argon MaxDriftTimeArgon=99 * Units.ns, # no OOT rejection for argon ValidityGateSuppressionArgon=False, # no OOT rejection for argon LowGateArgon=0, # no OOT rejection for argon HighGateArgon=75 * Units.ns, # no OOT rejection for argon MaskFirstHTBitArgon=False, MaskMiddleHTBitArgon=False, MaskLastHTBitArgon=False, useDriftTimeHTCorrection=True, useDriftTimeToTCorrection=True, # reenable ToT ) from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if InDetTrigFlags.InDet25nsec(): InDetTrigTRT_DriftCircleTool.ValidityGateSuppression = True InDetTrigTRT_DriftCircleTool.SimpleOutOfTimePileupSupression = False #if jobproperties.Beam.beamType()=="cosmics": # InDetTRT_DriftCircleTool.SimpleOutOfTimePileupSupression=False InDetTrigTRT_DriftCircleTool.ConditionsSummaryTool= \ "TRT_StrawStatusSummarySvc/"+TRT_ConditionsSetup.instanceName("InDetTRTStrawStatusSummarySvc") # "TRT_ConditionsSummarySvc/"+TRT_ConditionsSetup.instanceName("InDetTRTConditionsSummaryService") ToolSvc += InDetTrigTRT_DriftCircleTool print InDetTrigTRT_DriftCircleTool
def __init__(self, name, type): TrigFastTrackFinder.__init__(self, name) remapped_type = remap[type] assert (remapped_type is not None) #Global keys/names for collections from TrigInDetConfig.InDetTrigCollectionKeys import TrigPixelKeys, TrigSCTKeys self.useNewLayerNumberScheme = True self.OutputCollectionSuffix = type from AthenaCommon.AppMgr import ToolSvc numberingTool = TrigL2LayerNumberTool(name="TrigL2LayerNumberTool_FTF") numberingTool.UseNewLayerScheme = self.useNewLayerNumberScheme ToolSvc += numberingTool self.LayerNumberTool = numberingTool from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings # GPU offloading config begins self.useGPU = False #if type == "FS" : self.useGPU = True if self.useGPU: from TrigInDetAccelerationTool.TrigInDetAccelerationToolConf import TrigInDetAccelerationTool accelTool = TrigInDetAccelerationTool( name="TrigInDetAccelerationTool_FTF") ToolSvc += accelTool # GPU offloading config ends self.doResMon = InDetTrigSliceSettings[('doResMon', remapped_type)] # switch between Run-2/3 monitoring self.MonTool = TrigFastTrackFinderMonitoring(type, self.doResMon) from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool self.TrackSummaryTool = InDetTrigFastTrackSummaryTool # why is this TrigFastTrackFinderMonitoring() line added twice ??? # Run3 monitoring # self.MonTool = TrigFastTrackFinderMonitoring(type, self.doResMon) #Spacepoint conversion from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import TrigSpacePointConversionTool spTool = TrigSpacePointConversionTool().clone( 'TrigSpacePointConversionTool_' + remapped_type) spTool.DoPhiFiltering = InDetTrigSliceSettings[('doSpPhiFiltering', remapped_type)] spTool.UseNewLayerScheme = self.useNewLayerNumberScheme spTool.UseBeamTilt = False spTool.PixelSP_ContainerName = TrigPixelKeys.SpacePoints spTool.SCT_SP_ContainerName = TrigSCTKeys.SpacePoints spTool.layerNumberTool = numberingTool from RegionSelector.RegSelToolConfig import makeRegSelTool_Pixel from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT spTool.RegSel_Pixel = makeRegSelTool_Pixel() spTool.RegSel_SCT = makeRegSelTool_SCT() ToolSvc += spTool self.SpacePointProviderTool = spTool self.MinHits = 5 #Only process RoI with more than 5 spacepoints self.Triplet_MinPtFrac = 1 self.Triplet_nMaxPhiSlice = 53 if remapped_type == "cosmics": self.Triplet_nMaxPhiSlice = 2 #Divide detector in 2 halves for cosmics self.Triplet_MaxBufferLength = 3 self.doSeedRedundancyCheck = InDetTrigSliceSettings[( 'checkRedundantSeeds', remapped_type)] self.Triplet_D0Max = InDetTrigSliceSettings[('d0SeedMax', remapped_type)] self.Triplet_D0_PPS_Max = InDetTrigSliceSettings[('d0SeedPPSMax', remapped_type)] self.TrackInitialD0Max = 20. if remapped_type == 'cosmics': self.TrackInitialD0Max = 1000. self.TrackZ0Max = 1000. self.TripletDoPSS = False self.pTmin = InDetTrigSliceSettings[('pTmin', remapped_type)] self.DoubletDR_Max = InDetTrigSliceSettings[('dRdoubletMax', remapped_type)] self.SeedRadBinWidth = InDetTrigSliceSettings[('seedRadBinWidth', remapped_type)] if remapped_type == "cosmics": self.Doublet_FilterRZ = False ## SCT and Pixel detector elements road builder from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiDetElementsRoadMaker InDetTrigSiDetElementsRoadMaker_FTF = InDetTrigSiDetElementsRoadMaker.clone( 'InDetTrigSiDetElementsRoadMaker_FTF') InDetTrigSiDetElementsRoadMaker_FTF.RoadWidth = 10.0 if remapped_type == "cosmics": from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import InDetTrigSiDetElementsRoadMakerCosmics InDetTrigSiDetElementsRoadMaker_FTF = InDetTrigSiDetElementsRoadMakerCosmics.clone( 'InDetTrigSiDetElementsRoadMaker_FTF') from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiComTrackFinder InDetTrigSiComTrackFinder_FTF = InDetTrigSiComTrackFinder.clone( "InDetTrigSiComTrackFinder_FTF") from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool InDetTrigSiComTrackFinder_FTF.SctSummaryTool = SCT_ConditionsSummaryTool( SCT_ConditionsSetup.instanceName( 'InDetSCT_ConditionsSummaryToolWithoutFlagged')) ToolSvc += InDetTrigSiComTrackFinder_FTF from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts TrackingCuts = EFIDTrackingCuts if remapped_type == "cosmics": from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCutsCosmics TrackingCuts = EFIDTrackingCutsCosmics from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk TrackMaker_FTF = InDet__SiTrackMaker_xk( name='InDetTrigSiTrackMaker_FTF_' + type, RoadTool=InDetTrigSiDetElementsRoadMaker_FTF, CombinatorialTrackFinder=InDetTrigSiComTrackFinder_FTF, pTmin=InDetTrigSliceSettings[('pTmin', remapped_type)], nClustersMin=TrackingCuts.minClusters(), nHolesMax=TrackingCuts.nHolesMax(), nHolesGapMax=TrackingCuts.nHolesGapMax(), SeedsFilterLevel=0, # Do not use built-in seeds filter Xi2max=TrackingCuts.Xi2max(), Xi2maxNoAdd=TrackingCuts.Xi2maxNoAdd(), nWeightedClustersMin=TrackingCuts.nWeightedClustersMin(), Xi2maxMultiTracks=TrackingCuts.Xi2max(), UseAssociationTool=False) from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if type == 'eGamma' and InDetTrigFlags.doBremRecovery(): TrackMaker_FTF.useBremModel = True if remapped_type == "cosmics": TrackMaker_FTF.CosmicTrack = True ToolSvc += TrackMaker_FTF self.initialTrackMaker = TrackMaker_FTF from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigInDetTrackFitter theTrigInDetTrackFitter = TrigInDetTrackFitter() #theTrigInDetTrackFitter.correctClusterPos = False #Flag to control whether to correct cluster position theTrigInDetTrackFitter.correctClusterPos = True #temporarily to true to improve err(z0) estimates from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigRotCreator theTrigInDetTrackFitter.ROTcreator = InDetTrigRotCreator ToolSvc += theTrigInDetTrackFitter self.trigInDetTrackFitter = theTrigInDetTrackFitter from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if type == 'eGamma' and InDetTrigFlags.doBremRecovery(): theTrigInDetTrackFitterBrem = TrigInDetTrackFitter( name='theTrigInDetTrackFitterBrem', doBremmCorrection=True) ToolSvc += theTrigInDetTrackFitterBrem self.trigInDetTrackFitter = theTrigInDetTrackFitterBrem self.doZFinder = InDetTrigSliceSettings[('doZFinder', remapped_type)] if (self.doZFinder): from IDScanZFinder.IDScanZFinderConf import TrigZFinder theTrigZFinder = TrigZFinder(name="TrigZFinder_" + remapped_type) theTrigZFinder.NumberOfPeaks = 3 theTrigZFinder.LayerNumberTool = numberingTool if remapped_type == "beamSpot": theTrigZFinder.TripletMode = 1 theTrigZFinder.TripletDZ = 1 theTrigZFinder.PhiBinSize = 0.1 theTrigZFinder.UseOnlyPixels = True theTrigZFinder.MaxLayer = 3 theTrigZFinder.FullScanMode = True #TODO: know this from the RoI anyway - should set for every event self.trigZFinder = theTrigZFinder self.doFastZVertexSeeding = True self.zVertexResolution = 1 TrackMaker_FTF.InputClusterContainerName = "" TrackMaker_FTF.InputHadClusterContainerName = "" from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool self.TrackSummaryTool = InDetTrigFastTrackSummaryTool if remapped_type == "tauCore": from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigTrackSummaryToolWithHoleSearch self.TrackSummaryTool = InDetTrigTrackSummaryToolWithHoleSearch self.doCloneRemoval = InDetTrigSliceSettings[('doCloneRemoval', remapped_type)]
def makeInDetAlgs(whichSignature='', separateTrackParticleCreator='', rois='EMViewRoIs', doFTF=True, viewVerifier='IDViewDataVerifier'): #If signature specified add suffix to the algorithms signature = whichSignature if whichSignature else '' if signature != "" and separateTrackParticleCreator == "": separateTrackParticleCreator = signature if signature == "": raise ValueError('makeInDetAlgs() No signature specified') #Global keys/names for Trigger collections from .InDetTrigCollectionKeys import TrigPixelKeys, TrigSCTKeys from InDetRecExample.InDetKeys import InDetKeys from TrigInDetConfig.TrigInDetConfig import InDetCacheNames from AthenaCommon.GlobalFlags import globalflags viewAlgs = [] ViewDataVerifier = None if viewVerifier: import AthenaCommon.CfgMgr as CfgMgr ViewDataVerifier = CfgMgr.AthViews__ViewDataVerifier(viewVerifier + signature) ViewDataVerifier.DataObjects = [ ('InDet::PixelClusterContainerCache', InDetCacheNames.Pixel_ClusterKey), ('PixelRDO_Cache', InDetCacheNames.PixRDOCacheKey), ('InDet::SCT_ClusterContainerCache', InDetCacheNames.SCT_ClusterKey), ('SCT_RDO_Cache', InDetCacheNames.SCTRDOCacheKey), ('SpacePointCache', InDetCacheNames.SpacePointCachePix), ('SpacePointCache', InDetCacheNames.SpacePointCacheSCT), ('IDCInDetBSErrContainer_Cache', InDetCacheNames.SCTBSErrCacheKey), ('IDCInDetBSErrContainer_Cache', InDetCacheNames.SCTFlaggedCondCacheKey), ('xAOD::EventInfo', 'StoreGateSvc+EventInfo'), ('TagInfo', 'DetectorStore+ProcessingTags') ] viewAlgs.append(ViewDataVerifier) # Load RDOs if we aren't loading bytestream from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() topSequence.SGInputLoader.Load += [('TagInfo', 'DetectorStore+ProcessingTags')] if not globalflags.InputFormat.is_bytestream(): ViewDataVerifier.DataObjects += [ ('PixelRDO_Container', InDetKeys.PixelRDOs()), ('SCT_RDO_Container', InDetKeys.SCT_RDOs()), ('IDCInDetBSErrContainer', InDetKeys.SCT_ByteStreamErrs()) ] topSequence.SGInputLoader.Load += [ ('PixelRDO_Container', InDetKeys.PixelRDOs()), ('SCT_RDO_Container', InDetKeys.SCT_RDOs()), ('IDCInDetBSErrContainer', InDetKeys.SCT_ByteStreamErrs()) ] from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from AthenaCommon.AppMgr import ToolSvc #Only add raw data decoders if we're running over raw data if globalflags.InputFormat.is_bytestream(): #Pixel from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRodDecoder InDetPixelRodDecoder = PixelRodDecoder(name="InDetPixelRodDecoder_" + signature) # Disable duplcated pixel check for data15 because duplication mechanism was used. from RecExConfig.RecFlags import rec if len(rec.projectName()) >= 6 and rec.projectName()[:6] == "data15": InDetPixelRodDecoder.CheckDuplicatedPixel = False ToolSvc += InDetPixelRodDecoder from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProviderTool InDetPixelRawDataProviderTool = PixelRawDataProviderTool( name="InDetPixelRawDataProviderTool_" + signature, Decoder=InDetPixelRodDecoder, checkLVL1ID=False) ToolSvc += InDetPixelRawDataProviderTool if (InDetTrigFlags.doPrintConfigurables()): print(InDetPixelRawDataProviderTool) # noqa: ATL901 # load the PixelRawDataProvider from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProvider InDetPixelRawDataProvider = PixelRawDataProvider( name="InDetPixelRawDataProvider_" + signature, RDOKey=InDetKeys.PixelRDOs(), ProviderTool=InDetPixelRawDataProviderTool, ) InDetPixelRawDataProvider.isRoI_Seeded = True InDetPixelRawDataProvider.RoIs = rois InDetPixelRawDataProvider.RDOCacheKey = InDetCacheNames.PixRDOCacheKey viewAlgs.append(InDetPixelRawDataProvider) if (InDetTrigFlags.doPrintConfigurables()): print(InDetPixelRawDataProvider) # noqa: ATL901 #SCT from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder InDetSCTRodDecoder = SCT_RodDecoder(name="InDetSCTRodDecoder_" + signature) ToolSvc += InDetSCTRodDecoder from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProviderTool InDetSCTRawDataProviderTool = SCTRawDataProviderTool( name="InDetSCTRawDataProviderTool_" + signature, Decoder=InDetSCTRodDecoder) ToolSvc += InDetSCTRawDataProviderTool if (InDetTrigFlags.doPrintConfigurables()): print(InDetSCTRawDataProviderTool) # noqa: ATL901 # load the SCTRawDataProvider from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProvider InDetSCTRawDataProvider = SCTRawDataProvider( name="InDetSCTRawDataProvider_" + signature, RDOKey=InDetKeys.SCT_RDOs(), ProviderTool=InDetSCTRawDataProviderTool) InDetSCTRawDataProvider.isRoI_Seeded = True InDetSCTRawDataProvider.RoIs = rois InDetSCTRawDataProvider.RDOCacheKey = InDetCacheNames.SCTRDOCacheKey InDetSCTRawDataProvider.BSErrCacheKey = InDetCacheNames.SCTBSErrCacheKey from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT InDetSCTRawDataProvider.RegSelTool = makeRegSelTool_SCT() viewAlgs.append(InDetSCTRawDataProvider) # load the SCTEventFlagWriter from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTEventFlagWriter InDetSCTEventFlagWriter = SCTEventFlagWriter( name="InDetSCTEventFlagWriter_" + signature) viewAlgs.append(InDetSCTEventFlagWriter) #Pixel clusterisation from InDetTrigRecExample.InDetTrigConfigRecLoadTools import TrigPixelLorentzAngleTool, TrigSCTLorentzAngleTool from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelConfigCondAlg PixelConfigCondAlg.UseCalibConditions = False from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool InDetClusterMakerTool = InDet__ClusterMakerTool( name="InDetClusterMakerTool_" + signature, SCTLorentzAngleTool=TrigSCTLorentzAngleTool, PixelLorentzAngleTool=TrigPixelLorentzAngleTool) ToolSvc += InDetClusterMakerTool from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool InDetMergedPixelsTool = InDet__MergedPixelsTool( name="InDetMergedPixelsTool_" + signature, globalPosAlg=InDetClusterMakerTool, MinimalSplitSize=0, MaximalSplitSize=49, MinimalSplitProbability=0, DoIBLSplitting=True, ) # Enable duplcated RDO check for data15 because duplication mechanism was used. from RecExConfig.RecFlags import rec if len(rec.projectName()) >= 6 and rec.projectName()[:6] == "data15": InDetMergedPixelsTool.CheckDuplicatedRDO = True ToolSvc += InDetMergedPixelsTool from SiClusterizationTool.SiClusterizationToolConf import InDet__PixelGangedAmbiguitiesFinder InDetPixelGangedAmbiguitiesFinder = InDet__PixelGangedAmbiguitiesFinder( name="InDetPixelGangedAmbiguitiesFinder_" + signature) ToolSvc += InDetPixelGangedAmbiguitiesFinder from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization InDetPixelClusterization = InDet__PixelClusterization( name="InDetPixelClusterization_" + signature, clusteringTool=InDetMergedPixelsTool, gangedAmbiguitiesFinder=InDetPixelGangedAmbiguitiesFinder, DataObjectName=InDetKeys.PixelRDOs(), AmbiguitiesMap=TrigPixelKeys.PixelClusterAmbiguitiesMap, ClustersName=TrigPixelKeys.Clusters) InDetPixelClusterization.isRoI_Seeded = True InDetPixelClusterization.RoIs = rois InDetPixelClusterization.ClusterContainerCacheKey = InDetCacheNames.Pixel_ClusterKey viewAlgs.append(InDetPixelClusterization) # Create SCT_ConditionsSummaryTool from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup( "InDetSCT_ConditionsSummaryTool_" + signature) sct_ConditionsSummaryToolSetup.setup() InDetSCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool( ) # noqa: F841 sct_ConditionsSummaryToolSetupWithoutFlagged = SCT_ConditionsSummaryToolSetup( "InDetSCT_ConditionsSummaryToolWithoutFlagged_" + signature) sct_ConditionsSummaryToolSetupWithoutFlagged.setup() InDetSCT_ConditionsSummaryToolWithoutFlagged = sct_ConditionsSummaryToolSetupWithoutFlagged.getTool( ) # Add conditions tools to SCT_ConditionsSummaryTool from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup( ) sct_ConfigurationConditionsToolSetup.setToolName( "InDetSCT_ConfigurationConditionsTool_" + signature) sct_ConfigurationConditionsToolSetup.setup() InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools.append( sct_ConfigurationConditionsToolSetup.getTool().getFullName()) from SCT_ConditionsTools.SCT_ReadCalibDataToolSetup import SCT_ReadCalibDataToolSetup sct_ReadCalibDataToolSetup = SCT_ReadCalibDataToolSetup() sct_ReadCalibDataToolSetup.setToolName("InDetSCT_ReadCalibDataTool_" + signature) sct_ReadCalibDataToolSetup.setup() InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools.append( sct_ReadCalibDataToolSetup.getTool().getFullName()) from SCT_ConditionsTools.SCT_ByteStreamErrorsToolSetup import SCT_ByteStreamErrorsToolSetup sct_ByteStreamErrorsToolSetup = SCT_ByteStreamErrorsToolSetup() sct_ByteStreamErrorsToolSetup.setToolName("InDetSCT_BSErrorTool_" + signature) sct_ByteStreamErrorsToolSetup.setConfigTool( sct_ConfigurationConditionsToolSetup.getTool()) sct_ByteStreamErrorsToolSetup.setup() InDetSCT_ConditionsSummaryToolWithoutFlagged.ConditionsTools.append( sct_ByteStreamErrorsToolSetup.getTool().getFullName()) if (InDetTrigFlags.doPrintConfigurables()): print(InDetSCT_ConditionsSummaryToolWithoutFlagged) # # --- SCT_ClusteringTool # from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool( name="InDetSCT_ClusteringTool_" + signature, globalPosAlg=InDetClusterMakerTool, conditionsTool=InDetSCT_ConditionsSummaryToolWithoutFlagged) if InDetTrigFlags.doSCTIntimeHits(): if InDetTrigFlags.InDet25nsec(): InDetSCT_ClusteringTool.timeBins = "01X" else: InDetSCT_ClusteringTool.timeBins = "X1X" # # --- SCT_Clusterization algorithm # from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_Clusterization InDetSCT_Clusterization = InDet__SCT_Clusterization( name="InDetSCT_Clusterization_" + signature, clusteringTool=InDetSCT_ClusteringTool, # ChannelStatus = InDetSCT_ChannelStatusAlg, DataObjectName=InDetKeys.SCT_RDOs(), ClustersName=TrigSCTKeys.Clusters, #Adding the suffix to flagged conditions SCT_FlaggedCondData="SCT_FlaggedCondData_TRIG", conditionsTool=InDetSCT_ConditionsSummaryToolWithoutFlagged) InDetSCT_Clusterization.isRoI_Seeded = True InDetSCT_Clusterization.RoIs = rois InDetSCT_Clusterization.ClusterContainerCacheKey = InDetCacheNames.SCT_ClusterKey InDetSCT_Clusterization.FlaggedCondCacheKey = InDetCacheNames.SCTFlaggedCondCacheKey from RegionSelector.RegSelToolConfig import makeRegSelTool_SCT InDetSCT_Clusterization.RegSelTool = makeRegSelTool_SCT() viewAlgs.append(InDetSCT_Clusterization) #Space points and FTF from SiSpacePointTool.SiSpacePointToolConf import InDet__SiSpacePointMakerTool InDetSiSpacePointMakerTool = InDet__SiSpacePointMakerTool( name="InDetSiSpacePointMakerTool_" + signature) from AthenaCommon.DetFlags import DetFlags from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder from SiSpacePointFormation.InDetOnlineMonitor import InDetMonitoringTool InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder( name="InDetSiTrackerSpacePointFinder_" + signature, SiSpacePointMakerTool=InDetSiSpacePointMakerTool, PixelsClustersName=TrigPixelKeys.Clusters, SpacePointsPixelName=TrigPixelKeys.SpacePoints, SCT_ClustersName=TrigSCTKeys.Clusters, SpacePointsSCTName=TrigSCTKeys.SpacePoints, SpacePointsOverlapName=InDetKeys.OverlapSpacePoints(), ProcessPixels=DetFlags.haveRIO.pixel_on(), ProcessSCTs=DetFlags.haveRIO.SCT_on(), ProcessOverlaps=DetFlags.haveRIO.SCT_on(), SpacePointCacheSCT=InDetCacheNames.SpacePointCacheSCT, SpacePointCachePix=InDetCacheNames.SpacePointCachePix, monTool=InDetMonitoringTool()) viewAlgs.append(InDetSiTrackerSpacePointFinder) # Condition algorithm for SiTrackerSpacePointFinder if InDetSiTrackerSpacePointFinder.ProcessSCTs: from AthenaCommon.AlgSequence import AthSequencer condSeq = AthSequencer("AthCondSeq") if not hasattr(condSeq, "InDetSiElementPropertiesTableCondAlg"): # Setup alignment folders and conditions algorithms from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiElementPropertiesTableCondAlg condSeq += InDet__SiElementPropertiesTableCondAlg( name="InDetSiElementPropertiesTableCondAlg") #FIXME have a flag for now set for True( as most cases call FTF) but potentially separate if doFTF: from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinderBase theFTF = TrigFastTrackFinderBase( "TrigFastTrackFinder_" + whichSignature, whichSignature) theFTF.RoIs = rois theFTF.TracksName = "TrigFastTrackFinder_Tracks_" + separateTrackParticleCreator #the following doCloneRemoval modification should be set up in the InDetTrigSliceSettings once legacy trigger not needed if whichSignature == "Electron": theFTF.doCloneRemoval = True viewAlgs.append(theFTF) from TrigInDetConf.TrigInDetPostTools import InDetTrigParticleCreatorToolFTF from TrigEDMConfig.TriggerEDMRun3 import recordable from InDetTrigParticleCreation.InDetTrigParticleCreationConf import InDet__TrigTrackingxAODCnvMT trackCollection = "HLT_IDTrack_" + separateTrackParticleCreator + "_FTF" theTrackParticleCreatorAlg = InDet__TrigTrackingxAODCnvMT( name="InDetTrigTrackParticleCreatorAlg" + whichSignature, TrackName="TrigFastTrackFinder_Tracks_" + separateTrackParticleCreator, ParticleCreatorTool=InDetTrigParticleCreatorToolFTF) if separateTrackParticleCreator == "BeamSpot": theTrackParticleCreatorAlg.TrackParticlesName = trackCollection else: theTrackParticleCreatorAlg.TrackParticlesName = recordable( trackCollection) viewAlgs.append(theTrackParticleCreatorAlg) return viewAlgs, ViewDataVerifier
def __init__(self, name="TRTTrackExtAlg_Electron_EF", type="electron"): super(InDet__TRT_TrigTrackExtensionAlg, self).__init__(name) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPatternPropagator, InDetTrigPatternUpdator # TRT detector elements road builder # from TRT_DetElementsRoadTool_xk.TRT_DetElementsRoadTool_xkConf import InDet__TRT_DetElementsRoadMaker_xk InDetTrigTRTDetElementsRoadMaker = InDet__TRT_DetElementsRoadMaker_xk( name='InDetTrigTRTRoadMaker', #DetectorStoreLocation = 'DetectorStore', TRTManagerLocation='TRT', MagneticFieldMode='MapSolenoid', PropagatorTool=InDetTrigPatternPropagator) ToolSvc += InDetTrigTRTDetElementsRoadMaker if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTRTDetElementsRoadMaker # Track extension to TRT tool # from AthenaCommon.DetFlags import DetFlags if (DetFlags.haveRIO.TRT_on()): if InDetTrigFlags.trtExtensionType() is 'xk': from TRT_TrackExtensionTool_xk.TRT_TrackExtensionTool_xkConf import InDet__TRT_TrackExtensionTool_xk from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTRTDriftCircleCut InDetTrigTRTExtensionTool = \ InDet__TRT_TrackExtensionTool_xk(name = 'InDetTrigTRTExtensionTool', MagneticFieldMode = 'MapSolenoid', # default TRT_ClustersContainer = 'TRT_TrigDriftCircles', # default TrtManagerLocation = 'TRT', # default PropagatorTool = InDetTrigPatternPropagator, UpdatorTool = InDetTrigPatternUpdator, #RIOonTrackToolYesDr = # default for now #RIOonTrackToolNoDr = # default for now RoadTool = InDetTrigTRTDetElementsRoadMaker, DriftCircleCutTool = InDetTrigTRTDriftCircleCut, MinNumberDriftCircles = EFIDTrackingCuts.minTRTonTrk(), ScaleHitUncertainty = 2., RoadWidth = 20., UseParameterization = EFIDTrackingCuts.useParameterizedTRTCuts() ) elif InDetTrigFlags.trtExtensionType() is 'DAF': # load TRT Competing ROT tool from TrkDeterministicAnnealingFilter.TrkDeterministicAnnealingFilterConf import Trk__DAF_SimpleWeightCalculator InDetTrigWeightCalculator = Trk__DAF_SimpleWeightCalculator( name='InDetTrigWeightCalculator') ToolSvc += InDetTrigWeightCalculator if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigWeightCalculator from InDetCompetingRIOsOnTrackTool.InDetCompetingRIOsOnTrackToolConf import InDet__CompetingTRT_DriftCirclesOnTrackTool InDetTrigCompetingTRT_DC_Tool = \ InDet__CompetingTRT_DriftCirclesOnTrackTool( name = 'InDetTrigCompetingTRT_DC_Tool', MagneticFieldMode = 'MapSolenoid', # default PropagatorTool = InDetTrigPatternPropagator, ToolForWeightCalculation= InDetTrigWeightCalculator, ToolForTRT_DriftCircleOnTrackCreation = InDetTrigRotCreator.ToolTRT_DriftCircle) ToolSvc += InDetTrigCompetingTRT_DC_Tool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigCompetingTRT_DC_Tool from TRT_TrackExtensionTool_DAF.TRT_TrackExtensionTool_DAFConf import InDet__TRT_TrackExtensionTool_DAF InDetTrigTRTExtensionTool = \ InDet__TRT_TrackExtensionTool_DAF(name = 'InDetTrigTRTExtensionTool', MagneticFieldMode = 'MapSolenoid', # default TRT_DriftCircleContainer = 'TRT_TrigDriftCircles', # default CompetingDriftCircleTool = InDetTrigCompetingTRT_DC_Tool, PropagatorTool = InDetTrigPatternPropagator, RoadTool = InDetTrigTRTDetElementsRoadMaker) # ToolSvc += InDetTrigTRTExtensionTool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTRTExtensionTool self.TrackExtensionTool = InDetTrigTRTExtensionTool #monitoring from TRT_TrigTrackExtensionAlg.TRT_TrigTrackExtensionAlgMonitoring import TRT_TrigTrackExtensionAlgValidationMonitor from TRT_TrigTrackExtensionAlg.TRT_TrigTrackExtensionAlgMonitoring import TRT_TrigTrackExtensionAlgOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig exttime = TrigTimeHistToolConfig("ExtTime") exttime.TimerHistLimits = [0, 40] self.AthenaMonTools = [ TRT_TrigTrackExtensionAlgValidationMonitor(), TRT_TrigTrackExtensionAlgOnlineMonitor(), exttime ]
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="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="SiTrigTrackFinder_Electron_EF", type="electron", lowPt=False): super(InDet__SiTrigSPSeededTrackFinder, self).__init__(name) from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, \ InDetTrigPatternPropagator, InDetTrigPatternUpdator, \ InDetTrigRotCreator, InDetTrigPixelConditionsSummarySvc, InDetTrigSCTConditionsSummarySvc from AthenaCommon.AppMgr import ToolSvc # configure tools used # Space points seeds maker # from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings from AthenaCommon.DetFlags import DetFlags if type == "beamgas": from InDetTrigRecExample.InDetTrigConfigRecLoadToolsBeamGas import InDetTrigSiSpacePointsSeedMakerBeamGas InDetTrigSiSpacePointsSeedMaker = InDetTrigSiSpacePointsSeedMakerBeamGas elif type == "cosmicsN": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_Cosmic InDetTrigSiSpacePointsSeedMaker = \ InDet__SiSpacePointsSeedMaker_Cosmic(name = 'InDetTrigSiSpacePointsSeedMaker_'+type, pTmin = InDetTrigSliceSettings[('pTmin',type)], maxdImpact = EFIDTrackingCutsCosmics.maxPrimaryImpact(), maxZ = EFIDTrackingCutsCosmics.maxZImpact(), minZ = -EFIDTrackingCutsCosmics.maxZImpact(), SpacePointsPixelName = 'SCT_CosmicsTrigSpacePoints', SpacePointsSCTName = 'PixelCosmicsTrigSpacePoints', #SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(), UseAssociationTool = False, AssociationTool = InDetTrigPrdAssociationTool) elif lowPt: from InDetTrigRecExample.InDetTrigConfigRecLoadToolsLowPt import InDetTrigSiSpacePointsSeedMakerLowPt InDetTrigSiSpacePointsSeedMaker = InDetTrigSiSpacePointsSeedMakerLowPt elif type == "heavyIon" or type == "heavyIonFS": from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_HeavyIon InDetTrigSiSpacePointsSeedMaker = \ InDet__SiSpacePointsSeedMaker_HeavyIon(name= 'InDetTrigSiSpacePointsSeedMaker_'+type, pTmin = InDetTrigSliceSettings[('pTmin',type)], maxdImpact = EFIDTrackingCutsHeavyIon.maxPrimaryImpact(), maxZ = EFIDTrackingCutsHeavyIon.maxZImpact(), minZ = -EFIDTrackingCutsHeavyIon.maxZImpact(), #useOverlapSpCollection = False, #overlapCollections not used in EFID useOverlapSpCollection = InDetTrigFlags.doOverlapSP(), #testing usePixel = DetFlags.haveRIO.pixel_on(), useSCT = DetFlags.haveRIO.SCT_on(), SpacePointsSCTName = 'SCT_TrigSpacePoints', SpacePointsPixelName = 'PixelTrigSpacePoints', SpacePointsOverlapName = 'SPTrigOverlap', radMax = EFIDTrackingCutsHeavyIon.radMax()) else: from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_ATLxk InDetTrigSiSpacePointsSeedMaker = \ InDet__SiSpacePointsSeedMaker_ATLxk( name = 'InDetTrigSiSpacePointsSeedMaker_'+type, pTmin = InDetTrigSliceSettings[('pTmin',type)], maxdImpact = InDetTrigCutValues.maxPrimaryImpact(), maxZ = InDetTrigCutValues.maxZImpact(), minZ = -InDetTrigCutValues.maxZImpact(), #useOverlapSpCollection = False, #overlapCollections not used in EFID useOverlapSpCollection = InDetTrigFlags.doOverlapSP(), #testing usePixel = DetFlags.haveRIO.pixel_on(), useSCT = DetFlags.haveRIO.SCT_on(), SpacePointsSCTName = 'SCT_TrigSpacePoints', SpacePointsPixelName = 'PixelTrigSpacePoints', SpacePointsOverlapName = 'SPTrigOverlap', radMax = InDetTrigCutValues.radMax(), maxdImpactPPS = InDetTrigCutValues.maxdImpactPPSSeeds(), maxdImpactSSS = InDetTrigCutValues.maxdImpactSSSSeeds(), ) if type != "cosmicsN": InDetTrigSiSpacePointsSeedMaker.maxRadius1 = 0.75 * InDetTrigCutValues.radMax( ) InDetTrigSiSpacePointsSeedMaker.maxRadius2 = InDetTrigCutValues.radMax( ) InDetTrigSiSpacePointsSeedMaker.maxRadius3 = InDetTrigCutValues.radMax( ) # if type=="minBias": # InDetTrigSiSpacePointsSeedMaker.maxdImpact=5. ToolSvc += InDetTrigSiSpacePointsSeedMaker if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigSiSpacePointsSeedMaker #InDetTrigSiSpacePointsSeedMaker.OutputLevel = 1 # Z-coordinates primary vertices finder # from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk InDetTrigZvertexMaker = InDet__SiZvertexMaker_xk( name='InDetTrigZvertexMaker_' + type, Zmax=InDetTrigCutValues.maxZImpact(), Zmin=-InDetTrigCutValues.maxZImpact(), minRatio=0.17 # not default ) if type == "heavyIon" or type == "heavyIonFS": InDetTrigZvertexMaker.HistSize = 2000 InDetTrigZvertexMaker.minContent = 30 #InDetTrigZvertexMaker.SeedMakerTool = InDet__SiSpacePointsSeedMaker_ATLxk('InDetTrigSiSpacePointsSeedMaker_'+type)#to make it tool neutral InDetTrigZvertexMaker.SeedMakerTool = ToolSvc.allConfigurables[ 'InDetTrigSiSpacePointsSeedMaker_' + type] ToolSvc += InDetTrigZvertexMaker #InDetTrigZvertexMaker.OutputLevel=1 # SCT and Pixel detector elements road builder # from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiDetElementsRoadMaker, InDetTrigSiComTrackFinder # Local track finding using space point seed # from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk InDetTrigSiTrackMaker = InDet__SiTrackMaker_xk( name='InDetTrigSiTrackMaker_' + type, RoadTool=InDetTrigSiDetElementsRoadMaker, CombinatorialTrackFinder=InDetTrigSiComTrackFinder, pTmin=InDetTrigSliceSettings[('pTmin', type)], nClustersMin=InDetTrigCutValues.minClusters(), nHolesMax=InDetTrigCutValues.nHolesMax(), nHolesGapMax=InDetTrigCutValues.nHolesGapMax(), SeedsFilterLevel=InDetTrigCutValues.seedFilterLevel(), Xi2max=InDetTrigCutValues.Xi2max(), Xi2maxNoAdd=InDetTrigCutValues.Xi2maxNoAdd(), nWeightedClustersMin=InDetTrigCutValues.nWeightedClustersMin(), #CosmicTrack = InDetFlags.doCosmics(), Xi2maxMultiTracks=InDetTrigCutValues.Xi2max(), UseAssociationTool=False) if type == "beamgas": InDetTrigSiTrackMaker.pTmin = EFIDTrackingCutsBeamGas.minPT() InDetTrigSiTrackMaker.nClustersMin = EFIDTrackingCutsBeamGas.minClusters( ) InDetTrigSiTrackMaker.nHolesMax = EFIDTrackingCutsBeamGas.nHolesMax( ) InDetTrigSiTrackMaker.UseAssociationTool = True #for BG and LowPt elif type == "cosmicsN": #create an additional for cosmics from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import InDetTrigSiDetElementsRoadMakerCosmics InDetTrigSiTrackMaker.RoadTool = InDetTrigSiDetElementsRoadMakerCosmics InDetTrigSiTrackMaker.nClustersMin = EFIDTrackingCutsCosmics.minClusters( ) InDetTrigSiTrackMaker.nHolesMax = EFIDTrackingCutsCosmics.nHolesMax( ) #3 vs 7 InDetTrigSiTrackMaker.nHolesGapMax = EFIDTrackingCutsCosmics.nHolesGapMax( ) #3 InDetTrigSiTrackMaker.CosmicTrack = True #InDetTrigSiTrackMaker.GoodSeedClusterCount = 3 elif type == 'electron' and InDetTrigFlags.doBremRecovery(): InDetTrigSiTrackMaker.useBremModel = True ToolSvc += InDetTrigSiTrackMaker if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigSiTrackMaker self.SeedsTool = InDetTrigSiSpacePointsSeedMaker self.ZvertexTool = InDetTrigZvertexMaker self.useZvertexTool = InDetTrigFlags.useZvertexTool() if type == "beamgas" or type == "cosmicsN": self.ZvertexTool = None self.useZvertexTool = False elif type == "heavyIon" or type == "heavyIonFS": self.useZvertexTool = True if lowPt: from InDetTrigRecExample.InDetTrigConfigRecLoadToolsLowPt \ import InDetTrigSiSpacePointsSeedMakerLowPt,InDetTrigSiTrackMakerLowPt, InDetTrigZvertexMakerLowPt self.TrackTool = InDetTrigSiTrackMakerLowPt self.SeedsTool = InDetTrigSiSpacePointsSeedMakerLowPt self.useZvertexTool = InDetTrigFlags.useZvertexTool() self.ZvertexTool = InDetTrigZvertexMakerLowPt else: #self.TrackTool = InDetTrigSiTrackMaker self.TrackTool = InDet__SiTrackMaker_xk('InDetTrigSiTrackMaker_' + type) self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth', type)] self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth', type)] self.doFullScan = InDetTrigSliceSettings[('doFullScan', type)] #monitoring from SiTrigSPSeededTrackFinder.SiTrigSPSeededTrackFinderMonitoring import \ SiTrigSPSeededTrackFinderValidationMonitor, \ SiTrigSPSeededTrackFinderOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig sitrktime = TrigTimeHistToolConfig("SiTRKTime") sitrktime.TimerHistLimits = [0, 200] self.AthenaMonTools = [ SiTrigSPSeededTrackFinderValidationMonitor(type=type), SiTrigSPSeededTrackFinderOnlineMonitor(type=type), sitrktime ]
def __init__(self, name="SCTClustering_Electron_EF", type="electron"): super(InDet__SCT_TrgClusterization, self).__init__(name) from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from AthenaCommon.AppMgr import ServiceMgr as svcMgr from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ByteStreamErrorsTool from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup InDetTrigBSErrorTool = SCT_ByteStreamErrorsTool( name=SCT_ConditionsSetup.instanceName( "InDetSCT_ByteStreamErrorsTool")) from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder InDetTrigSCTRodDecoder = SCT_RodDecoder(name="InDetTrigSCTRodDecoder") ToolSvc += InDetTrigSCTRodDecoder if (InDetTrigFlags.doPrintConfigurables()): print(InDetTrigSCTRodDecoder) from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProviderTool from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup InDetTrigSCTRawDataProviderTool = SCTRawDataProviderTool( name="InDetTrigSCTRawDataProviderTool", Decoder=InDetTrigSCTRodDecoder) ToolSvc += InDetTrigSCTRawDataProviderTool from InDetTrigRawDataProvider.InDetTrigRawDataProviderConf import InDet__TrigSCTRawDataProvider InDetTrigSCTRawDataProvider = \ InDet__TrigSCTRawDataProvider(name="TrigSCTRawDataProvider_EF", RDOKey = EF_SCTRDOKey, RawDataTool = InDetTrigSCTRawDataProviderTool) ToolSvc += InDetTrigSCTRawDataProvider from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigClusterMakerTool from SCT_ConditionsTools.SCT_ConditionsToolsConf import SCT_ConditionsSummaryTool self.conditionsSummaryTool = SCT_ConditionsSummaryTool( SCT_ConditionsSetup.instanceName( 'InDetSCT_ConditionsSummaryToolWithoutFlagged')) # SCT_ClusteringTool (public) from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool InDetTrigSCT_ClusteringTool = \ InDet__SCT_ClusteringTool(name = "InDetTrigSCT_ClusteringTool", globalPosAlg = InDetTrigClusterMakerTool, conditionsTool = self.conditionsSummaryTool ) if InDetTrigFlags.doSCTIntimeHits(): if InDetTrigFlags.InDet25nsec(): InDetTrigSCT_ClusteringTool.timeBins = "01X" else: InDetTrigSCT_ClusteringTool.timeBins = "X1X" ToolSvc += InDetTrigSCT_ClusteringTool self.RawDataProvider = InDetTrigSCTRawDataProvider self.clusteringTool = InDetTrigSCT_ClusteringTool self.SCT_RDOContainerName = EF_SCTRDOKey from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth', type)] self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth', type)] self.doFullScan = InDetTrigSliceSettings[('doFullScan', type)] if InDetTrigFlags.cutSCTOccupancy(): self.maxRDOs = 384 #used to be 77 but it was reached quite frequently #monitoring from InDetTrigPrepRawDataFormat.InDetTrigPrepRawDataFormatMonitoring import SctTrigPrepRawDataFormatValidationMonitor from InDetTrigPrepRawDataFormat.InDetTrigPrepRawDataFormatMonitoring import SctTrigPrepRawDataFormatOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig scttime = TrigTimeHistToolConfig("SctTime") scttime.TimerHistLimits = [0, 100] self.AthenaMonTools = [ SctTrigPrepRawDataFormatValidationMonitor(type=type), SctTrigPrepRawDataFormatOnlineMonitor(type=type), scttime ]
from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackSummaryHelperTool,\ InDetTrigTrackSummaryHelperToolSharedHits,InDetTrigTRT_ElectronPidTool from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool InDetTrigFastTrackSummaryTool = Trk__TrackSummaryTool(name = "InDetTrigFastTrackSummaryTool", InDetSummaryHelperTool = InDetTrigTrackSummaryHelperTool, InDetHoleSearchTool = None, doSharedHits = False, TRT_ElectronPidTool = None ) ToolSvc += InDetTrigFastTrackSummaryTool if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigFastTrackSummaryTool from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigHoleSearchTool InDetTrigTrackSummaryToolWithHoleSearch = Trk__TrackSummaryTool(name = "InDetTrigTrackSummaryToolWithHoleSearch", InDetSummaryHelperTool = InDetTrigTrackSummaryHelperTool, InDetHoleSearchTool = InDetTrigHoleSearchTool, doSharedHits = False, TRT_ElectronPidTool = None ) ToolSvc += InDetTrigTrackSummaryToolWithHoleSearch if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTrackSummaryToolWithHoleSearch
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from __future__ import print_function """ Instantiates tools for back tracking and L2 """ __author__ = "J. Masik" __version__ = "$Revision$" __doc__ = "InDetTrigConfigRecLoadToolsBack" from AthenaCommon.AppMgr import ToolSvc from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags from InDetTrigRecExample.InDetTrigConfigRecLoadTools import \ InDetTrigPatternPropagator # configure tools used # TRT detector elements road builder # from TRT_DetElementsRoadTool_xk.TRT_DetElementsRoadTool_xkConf import InDet__TRT_DetElementsRoadMaker_xk InDetTrigTRTDetElementsRoadMaker = InDet__TRT_DetElementsRoadMaker_xk( name='InDetTrigTRTRoadMaker', MagneticFieldMode='MapSolenoid', RoadWidth=20., PropagatorTool=InDetTrigPatternPropagator) ToolSvc += InDetTrigTRTDetElementsRoadMaker if (InDetTrigFlags.doPrintConfigurables()): print(InDetTrigTRTDetElementsRoadMaker)
log = logging.getLogger("InDetTrigConfigRecLoadToolsCosmics.py") from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCutsCosmics from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigHoleSearchTool from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool from InDetTrigRecExample.InDetTrigConditionsAccess import TRT_ConditionsSetup InDetTrigTrackSummaryHelperToolCosmics = \ InDet__InDetTrackSummaryHelperTool(name = "InDetTrigSummaryHelperCosmics", HoleSearch = InDetTrigHoleSearchTool, TRTStrawSummarySvc=TRT_ConditionsSetup.instanceName('InDetTRTStrawStatusSummarySvc'), DoSharedHits = False) ToolSvc += InDetTrigTrackSummaryHelperToolCosmics if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTrackSummaryHelperToolCosmics from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool InDetTrigTrackSummaryToolCosmics = \ Trk__TrackSummaryTool(name = "InDetTrigTrackSummaryToolCosmics", InDetSummaryHelperTool = InDetTrigTrackSummaryHelperToolCosmics, InDetHoleSearchTool = InDetTrigHoleSearchTool) ToolSvc += InDetTrigTrackSummaryToolCosmics if (InDetTrigFlags.doPrintConfigurables()): print InDetTrigTrackSummaryToolCosmics from InDetTrackScoringTools.InDetTrackScoringToolsConf import InDet__InDetCosmicScoringTool InDetTrigScoringToolCosmics_SiPattern = \ InDet__InDetCosmicScoringTool(name = 'InDetTrigCosmicScoringTool_SiPattern', SummaryTool = InDetTrigTrackSummaryToolCosmics)
def __init__(self, name, type): TrigFastTrackFinder.__init__(self, name) remapped_type = remapper(type) self.retrieveBarCodes = False #Look at truth information for spacepoints from barcodes #self.SignalBarCodes = [10001] #single particles self.SignalBarCodes = [11, 12] #z->mumu self.useNewLayerNumberScheme = True self.OutputCollectionSuffix = type from AthenaCommon.AppMgr import ToolSvc numberingTool = TrigL2LayerNumberTool(name="TrigL2LayerNumberTool_FTF") numberingTool.UseNewLayerScheme = self.useNewLayerNumberScheme ToolSvc += numberingTool self.LayerNumberTool = numberingTool timeHist = TrigTimeHistToolConfig("Time") timeHist.TimerHistLimits = [0, 10000] from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings self.doResMon = InDetTrigSliceSettings[('doResMon', remapped_type)] self.AthenaMonTools = [ TrigFastTrackFinder_ValidationMonitoring( "TrigFastTrackFinder_ValidationMonitoring", self.doResMon), TrigFastTrackFinder_OnlineMonitoring( "TrigFastTrackFinder_OnlineMonitoring", self.doResMon), timeHist ] if type == "FTK" or type == "FTKRefit" or type == "FTKMon": from TrigFTK_RecExample.TrigFTKLoadTools import theFTK_DataProviderSvc self.FTK_DataProviderSvc = theFTK_DataProviderSvc self.FTK_Mode = True if type == "FTKRefit": self.FTK_Refit = True else: #Spacepoint conversion from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import TrigSpacePointConversionTool spTool = TrigSpacePointConversionTool().clone( 'TrigSpacePointConversionTool_' + remapped_type) spTool.DoPhiFiltering = InDetTrigSliceSettings[('doSpPhiFiltering', remapped_type)] spTool.UseNewLayerScheme = self.useNewLayerNumberScheme spTool.UseBeamTilt = False spTool.layerNumberTool = numberingTool ToolSvc += spTool self.SpacePointProviderTool = spTool self.MinSPs = 5 #Only process RoI with more than 5 spacepoints self.Triplet_MinPtFrac = 1 self.Triplet_nMaxPhiSlice = 53 if remapped_type == "cosmics": self.Triplet_nMaxPhiSlice = 2 #Divide detector in 2 halves for cosmics self.Triplet_MaxBufferLength = 3 self.doSeedRedundancyCheck = InDetTrigSliceSettings[( 'checkRedundantSeeds', remapped_type)] self.Triplet_D0Max = InDetTrigSliceSettings[('d0SeedMax', remapped_type)] self.Triplet_D0_PPS_Max = InDetTrigSliceSettings[('d0SeedPPSMax', remapped_type)] self.TrackInitialD0Max = 20. if remapped_type == 'cosmics': self.TrackInitialD0Max = 1000. self.TrackZ0Max = 1000. self.TripletDoPSS = False self.pTmin = InDetTrigSliceSettings[('pTmin', remapped_type)] self.DoubletDR_Max = InDetTrigSliceSettings[('dRdoubletMax', remapped_type)] self.SeedRadBinWidth = InDetTrigSliceSettings[('seedRadBinWidth', remapped_type)] if remapped_type == "cosmics": self.Doublet_FilterRZ = False ## SCT and Pixel detector elements road builder from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiDetElementsRoadMaker InDetTrigSiDetElementsRoadMaker_FTF = InDetTrigSiDetElementsRoadMaker.clone( 'InDetTrigSiDetElementsRoadMaker_FTF') InDetTrigSiDetElementsRoadMaker_FTF.RoadWidth = 10.0 if remapped_type == "cosmics": from InDetTrigRecExample.InDetTrigConfigRecLoadToolsCosmics import InDetTrigSiDetElementsRoadMakerCosmics InDetTrigSiDetElementsRoadMaker_FTF = InDetTrigSiDetElementsRoadMakerCosmics.clone( 'InDetTrigSiDetElementsRoadMaker_FTF') ToolSvc += InDetTrigSiDetElementsRoadMaker_FTF from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiComTrackFinder InDetTrigSiComTrackFinder_FTF = InDetTrigSiComTrackFinder.clone( "InDetTrigSiComTrackFinder_FTF") ToolSvc += InDetTrigSiComTrackFinder_FTF from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts TrackingCuts = EFIDTrackingCuts if remapped_type == "cosmics": from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCutsCosmics TrackingCuts = EFIDTrackingCutsCosmics from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk TrackMaker_FTF = InDet__SiTrackMaker_xk( name='InDetTrigSiTrackMaker_FTF_' + type, RoadTool=InDetTrigSiDetElementsRoadMaker_FTF, CombinatorialTrackFinder=InDetTrigSiComTrackFinder_FTF, pTmin=InDetTrigSliceSettings[('pTmin', remapped_type)], nClustersMin=TrackingCuts.minClusters(), nHolesMax=TrackingCuts.nHolesMax(), nHolesGapMax=TrackingCuts.nHolesGapMax(), SeedsFilterLevel=0, # Do not use built-in seeds filter Xi2max=TrackingCuts.Xi2max(), Xi2maxNoAdd=TrackingCuts.Xi2maxNoAdd(), nWeightedClustersMin=TrackingCuts.nWeightedClustersMin(), Xi2maxMultiTracks=TrackingCuts.Xi2max(), UseAssociationTool=False) from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if type == 'eGamma' and InDetTrigFlags.doBremRecovery(): TrackMaker_FTF.useBremModel = True if remapped_type == "cosmics": TrackMaker_FTF.RoadTool.CosmicTrack = True ToolSvc += TrackMaker_FTF self.initialTrackMaker = TrackMaker_FTF from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigInDetTrackFitter theTrigInDetTrackFitter = TrigInDetTrackFitter() #theTrigInDetTrackFitter.correctClusterPos = False #Flag to control whether to correct cluster position theTrigInDetTrackFitter.correctClusterPos = True #temporarily to true to improve err(z0) estimates from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigRotCreator theTrigInDetTrackFitter.ROTcreator = InDetTrigRotCreator ToolSvc += theTrigInDetTrackFitter self.trigInDetTrackFitter = theTrigInDetTrackFitter from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags if type == 'eGamma' and InDetTrigFlags.doBremRecovery(): theTrigInDetTrackFitterBrem = TrigInDetTrackFitter( name='theTrigInDetTrackFitterBrem', doBremmCorrection=True) ToolSvc += theTrigInDetTrackFitterBrem self.trigInDetTrackFitter = theTrigInDetTrackFitterBrem self.doZFinder = InDetTrigSliceSettings[('doZFinder', remapped_type)] if (self.doZFinder): from IDScanZFinder.IDScanZFinderConf import TrigZFinder theTrigZFinder = TrigZFinder() theTrigZFinder.NumberOfPeaks = 3 theTrigZFinder.LayerNumberTool = numberingTool theTrigZFinder.FullScanMode = True #TODO: know this from the RoI anyway - should set for every event ToolSvc += theTrigZFinder self.trigZFinder = theTrigZFinder self.doFastZVertexSeeding = True self.zVertexResolution = 1 from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool self.TrackSummaryTool = InDetTrigFastTrackSummaryTool if remapped_type == "tauCore": from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigTrackSummaryToolWithHoleSearch self.TrackSummaryTool = InDetTrigTrackSummaryToolWithHoleSearch from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigL2ResidualCalculator resCalc = TrigL2ResidualCalculator(OfflineClusters=False) ToolSvc += resCalc self.TrigL2ResidualCalculator = resCalc self.doCloneRemoval = InDetTrigSliceSettings[('doCloneRemoval', remapped_type)]
def __init__(self, seqName="Tau", type="tau", seqType="InsideOut"): """ @param[in] seqName which enters into the sequence name inbetween algorithmName_seqName_EFID can be freely modified @param[in] type which is a slice name and is used to set up slice specific variables @param[in] seqType the type of sequence - it can be one of InsideOut, OutsideIn, TRTOnly, Combined,.... """ #print "TrigEFIDSequence seqName=%s type=%s seqType=%s" % (seqName,type,seqType) algos = [] from TrigInDetConf.TrigInDetSequence import vertexXAODCnvNeeded runvtxxaodcnv = vertexXAODCnvNeeded() if seqType == "InsideOut": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), # ("InDetTrigDetailedTrackTruthMaker",""), ("TrigVxPrimary", ""), # ("InDetTrigParticleCreation",""), # ("InDetTrigTrackParticleTruthMaker",""), ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] if type == "minBias" or type == "minBias400": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("TrigVxPrimary", ""), # ("InDetTrigParticleCreation",""), ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] elif type == "bjet": #from InDetTrigVxSecondary.InDetTrigVxSecondary_LoadTools import TrigVxSecondary_EF #algos += [("TrigVxSecondary","")] algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("InDetTrigDetailedTrackTruthMaker", ""), ("TrigVxPrimary", ""), # ("InDetTrigParticleCreation",""), ("InDetTrigTrackParticleTruthMaker", "") ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] elif seqType == "InsideOutTrk": algos = [("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("InDetTrigDetailedTrackTruthMaker", "")] elif seqType == "Vtx": algos = [("TrigVxPrimary", "")] if type == "bjet": algos = [("TrigVxPrimaryAllTE", "")] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] elif seqType == "InsideOutPost": algos = [ #("InDetTrigParticleCreation",""), ("InDetTrigTrackingxAODCnv", ""), ("InDetTrigTrackParticleTruthMaker", "") ] elif seqType == "InsideOutNoTRT": a1 = [ ("PixelClustering", ""), ("SCTClustering", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("InDetTrigDetailedTrackTruthMaker", ""), ] av = [("TrigVxPrimary", "")] if runvtxxaodcnv: av += [("InDetTrigVertexxAODCnv", "")] a2 = [ #("InDetTrigParticleCreation",""), ("InDetTrigTrackParticleTruthMaker", "") ] if type == "heavyIon" or type == "heavyIonFS": algos = a1 + a2 else: algos = a1 + av + a2 elif seqType == "InsideOutLowPt": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("InDetTrigTrackPRD_Association", ""), ("SiTrigSpacePointFinderLowPt", ""), ("SiTrigTrackFinderLowPt", ""), ("TrigAmbiguitySolverLowPt", ""), ("SimpleTrigTrackCollMerger", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("TrigVxPrimary", ""), #("InDetTrigParticleCreation",""), ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] elif seqType == "OutsideIn": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("TRT_TrigTrackSegmentsFinder", "InDetTrigTRT_TrackSegmentsFinder_%s_EFID"), ("TRT_TrigSeededTrackFinder", "InDetTrigTRT_SeededTrackFinder_%s_EFID"), ("TRTSeededTrigAmbiguitySolver", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("InDetTrigDetailedTrackTruthMaker", ""), #("InDetTrigParticleCreation",""), ("InDetTrigTrackParticleTruthMaker", "") ] elif seqType == "TRTOnly": algos = [ ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("TRT_TrigTrackSegmentsFinder", "InDetTrigTRT_TrackSegmentsFinder_%s_EFID"), ("InDetTrigTrackPRD_Association", "InDetTrigTRTStandalonePRD_Association_%s_EFID"), ("TRT_TrigStandaloneTrackFinder", "InDetTrigTRT_StandaloneTrackFinder_%s_EFID"), ("InDetTrigTrackSlimmer", "InDetTrigTrackSlimmerTRTOnly_%s_EFID"), ("InDetTrigTrackingxAODCnv", "InDetTrigTrackingxAODCnvTRTOnly_%s_EFID"), ("InDetTrigDetailedTrackTruthMaker", "InDetTrigDetailedTrackTruthMakerTRTOnly_%s_EFID"), ("TrigVxPrimary", "TrigVxPrimaryTRTOnly_%s_EFID"), #("InDetTrigParticleCreation", "InDetTrigParticleCreationTRTOnly_%s_EFID"), ("InDetTrigTrackParticleTruthMaker", "InDetTrigTrackParticleTruthMakerTRTOnly_%s_EFID") ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "InDetTrigVertexxAODCnvTRTOnly_%s_EFID")] elif seqType == "Combined": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackPRD_Association", "InDetTrigSegmentPRD_Association_%s_EFID"), ("TRT_TrigTrackSegmentsFinder", "InDetTrigTRT_TrackSegmentsFinderCombined_%s_EFID"), ("TRT_TrigSeededTrackFinder", "InDetTrigTRT_SeededTrackFinder_%s_EFID"), ("TRTSeededTrigAmbiguitySolver", "TRTSeededTrigAmbiguitySolver_%s_EFID"), ("InDetTrigTrackPRD_Association", "InDetTrigTRTOnlyPRD_Association_%s_EFID"), ("TRT_TrigStandaloneTrackFinder", "InDetTrigTRT_StandaloneTrackFinderCombined_%s_EFID"), ("TrkTrigTrackCollectionMerger", "TrigTrackCollectionMerger_%s_EFID"), ("InDetTrigTrackSlimmer", "InDetTrigTrackSlimmerCombined_%s_EFID"), ("InDetTrigTrackingxAODCnv", "InDetTrigTrackingxAODCnvCombined_%s_EFID"), ("InDetTrigDetailedTrackTruthMaker", "InDetTrigDetailedTrackTruthMakerCombined_%s_EFID"), #("InDetTrigParticleCreation", "InDetTrigParticleCreationCombined_%s_EFID"), ("InDetTrigTrackParticleTruthMaker", "InDetTrigTrackParticleTruthMakerCombined_%s_EFID") ] elif seqType == "CombinedWithConversions": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackPRD_Association", "InDetTrigSegmentPRD_Association_%s_EFID"), ("TRT_TrigTrackSegmentsFinder", "InDetTrigTRT_TrackSegmentsFinderCombined_%s_EFID"), ("TRT_TrigSeededTrackFinder", "InDetTrigTRT_SeededTrackFinder_%s_EFID"), ("TRTSeededTrigAmbiguitySolver", "TRTSeededTrigAmbiguitySolver_%s_EFID"), ("InDetTrigTrackPRD_Association", "InDetTrigTRTOnlyPRD_Association_%s_EFID"), ("TRT_TrigStandaloneTrackFinder", "InDetTrigTRT_StandaloneTrackFinderCombined_%s_EFID"), ("TrkTrigTrackCollectionMerger", "TrigTrackCollectionMerger_%s_EFID"), ("InDetTrigTrackSlimmer", "InDetTrigTrackSlimmerCombined_%s_EFID"), ("InDetTrigTrackingxAODCnv", "InDetTrigTrackingxAODCnvCombined_%s_EFID"), ("InDetTrigDetailedTrackTruthMaker", "InDetTrigDetailedTrackTruthMakerCombined_%s_EFID"), #("InDetTrigParticleCreation", "InDetTrigParticleCreationCombined_%s_EFID"), ("InDetTrigTrackParticleTruthMaker", "InDetTrigTrackParticleTruthMakerCombined_%s_EFID"), ("InDetTrigConversionFinder", "InDetTrigConversionFinderCombined_%s_EFID") ] elif seqType == "InsideOutAndTRTOnly": algos = [ ("PixelClustering", ""), ("SCTClustering", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("SiTrigSpacePointFinder", ""), ("SiTrigTrackFinder", ""), ("TrigAmbiguitySolver", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackParticleTruthMaker", ""), ("TRT_TrigTrackSegmentsFinder", "InDetTrigTRT_TrackSegmentsFinder_%s_EFID"), ("TRT_TrigStandaloneTrackFinder", "InDetTrigTRT_StandaloneTrackFinder_%s_EFID"), ("TrkTrigTrackCollectionMerger", "TrigTrackCollectionMergerIOTRT_%s_EFID"), ("InDetTrigTrackSlimmer", "InDetTrigTrackSlimmerIOTRT_%s_EFID"), ("InDetTrigTrackingxAODCnv", "InDetTrigTrackingxAODCnvIOTRT_%s_EFID"), ("InDetTrigDetailedTrackTruthMaker", "InDetTrigDetailedTrackTruthMakerIOTRT_%s_EFID"), #("InDetTrigParticleCreation", "InDetTrigParticleCreationIOTRT_%s_EFID"), ("InDetTrigTrackParticleTruthMaker", "InDetTrigTrackParticleTruthMakerIOTRT_%s_EFID"), ("TrigVxPrimary", ""), ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "InDetTrigVertexxAODCnvIOTRT_%s_EFID")] elif seqType == "DataPrep": algos = [ ("PixelClustering", "PixelClustering_%s_IDTrig"), ("SCTClustering", "SCTClustering_%s_IDTrig"), #("TRTDriftCircleMaker",""), ("SiTrigSpacePointFinder", "SiTrigSpacePointFinder_%s_IDTrig"), ] elif seqType == "SimpleTrackFinder": algos = [ #("SiTrigTrackFinder",""), ("SiTrigSimpleTrackFinder", ""), ] elif seqType == "InsideOutMerged": algos = [ #("SiTrigTrackSeededFinder",""), ("TrigAmbiguitySolver", ""), ("TRTDriftCircleMaker", ""), ("InDetTrigPRD_MultiTruthMaker", ""), ("TRTTrackExtAlg", ""), ("TrigExtProcessor", ""), ("InDetTrigTrackSlimmer", ""), ("InDetTrigTrackingxAODCnv", ""), ("InDetTrigDetailedTrackTruthMaker", ""), ("TrigVxPrimary", ""), #("InDetTrigParticleCreation",""), ("InDetTrigTrackParticleTruthMaker", ""), ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] elif seqType == "StandAloneVtxAllTE": algos = [ ("TrigVxPrimaryAllTESG", ""), ] if runvtxxaodcnv: algos += [("InDetTrigVertexxAODCnv", "")] #remove truth algorithms if not InDetTrigFlags.doTruth(): import re for i in algos: if re.search('Truth', i[0]): algos.remove((i[0], i[1])) #create python code to be executed alglist = "algseq = [" for i in algos: #self.__algos__.append(i) algline = self._item_line(i[0], i[1], seqName, type, seqType) alglist += algline + ',' alglist += "]" #this should be avoided by a higher level steering # modify the sequence acoording to triggerflags from TriggerJobOpts.TriggerFlags import TriggerFlags if not (TriggerFlags.doEF() or TriggerFlags.doHLT()) or not TriggerFlags.doFEX(): from TrigSteeringTest.TrigSteeringTestConf import PESA__dummyAlgo as dummyAlgo_disabledByTriggerFlags_EFID dummyAlgEFID = dummyAlgo_disabledByTriggerFlags_EFID( "doEF_or_doFEX_False_no_EFID") alglist = 'algseq = [dummyAlgEFID]' algseq = [] try: exec alglist except: from sys import exc_info (a, reason, c) = exc_info() print reason log.error("Cannot create EFID sequence %s, leaving empty" % alglist) import traceback print traceback.format_exc() #raise Exception self.__sequence__ = algseq
# --- setup flags with default values log.info("InDetTrigRec_jobOptions: InDetTrigFlags not set - setting to defaults") from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags InDetTrigFlags.doNewTracking.set_Value_and_Lock(True) #InDetTrigFlags.InDet25nsec = True #autoconfig and runHLT_standalone setting for BS InDetTrigFlags.primaryVertexSetup = "IterativeFinding" #InDetTrigFlags.primaryVertexSetup = "DefaultFastFinding" InDetTrigFlags.doRefit = True # switched on for ATR-12226 (z0 uncertainties in bjets) InDetTrigFlags.doPixelClusterSplitting = False InDetTrigFlags.doPrintConfigurables = False # #InDetTrigFlags.doPrintConfigurables = True # #moved the truth setting (can be overriden with set&lock) InDetTrigFlags.doTruth = TriggerFlags.doTruth() InDetTrigFlags.init() InDetTrigFlags.print_JobProperties() # # ----------- printout the setup # InDetTrigFlags.printInfo() # if not 'InDetTrigCutValues' in dir(): # # # # --- setup physics cuts with default values # # # log.info("InDetRec_jobOptions: InDetTrigCutValues not set - setting to defaults") # include ("InDetTrigRecExample/ConfiguredInDetCutValues.py" ) # InDetTrigCutValues = ConfiguredInDetCutValues() #
nClustersMin = EFIDTrackingCutsLowPt.minClusters(), nHolesMax = EFIDTrackingCutsLowPt.nHolesMax(), nHolesGapMax = EFIDTrackingCutsLowPt.nHolesGapMax(), SeedsFilterLevel = EFIDTrackingCutsLowPt.seedFilterLevel(), Xi2max = EFIDTrackingCutsLowPt.Xi2max(), Xi2maxNoAdd = EFIDTrackingCutsLowPt.Xi2maxNoAdd(), nWeightedClustersMin= EFIDTrackingCutsLowPt.nWeightedClustersMin(), CosmicTrack = False, UseAssociationTool = True ) ToolSvc += InDetTrigSiTrackMakerLowPt if InDetTrigFlags.doAmbiSolving(): from InDetAmbiTrackSelectionTool.InDetAmbiTrackSelectionToolConf import InDet__InDetAmbiTrackSelectionTool InDetTrigAmbiTrackSelectionToolLowPt = \ InDet__InDetAmbiTrackSelectionTool(name = 'InDetTrigAmbiTrackSelectionToolLowPt', AssociationTool = InDetTrigPrdAssociationTool, DriftCircleCutTool = InDetTrigTRTDriftCircleCut, minHits = EFIDTrackingCutsLowPt.minClusters()-2, minNotShared = EFIDTrackingCutsLowPt.minSiNotShared(), maxShared = EFIDTrackingCutsLowPt.maxShared(), minTRTHits = 0, # used for Si only tracking !!! Cosmics = False, #there is a different instance UseParameterization = False )
SiTrigSPSeededTrackFinderValidationMonitor, \ SiTrigSPSeededTrackFinderOnlineMonitor from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig sitrktime = TrigTimeHistToolConfig("SiTRKTime") sitrktime.TimerHistLimits = [0, 200] self.AthenaMonTools = [ SiTrigSPSeededTrackFinderValidationMonitor(type=type), SiTrigSPSeededTrackFinderOnlineMonitor(type=type), sitrktime ] # ----------- Refitting of tracks before further processing # if InDetTrigFlags.doRefit(): log.info("InDetTrigFlags - refit set but not used in the Trigger! ") # -------------------- # class SiTrigTrackSeededFinder_EF(SiTrigTrackFinder_EF): __slots__ = [] def __init__(self, name="SiTrigTrackSeededFinder_Electron_EF", type="electron", lowPt=False): SiTrigTrackFinder_EF.__init__(self, name, type, lowPt) from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk