Exemplo n.º 1
0
    def __init__(self,
                 name="ConfiguredTrigFTKTrackConverter",
                 DoTrackFit=False,
                 DoTruth=False,
                 TrackFitter=None,
                 UsePixelCalibSvc=True):
        TrigFTKTrackConverter.__init__(self, name)
        from AthenaCommon.AppMgr import ToolSvc
        from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter
        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator, \
            InDetTrigNavigator, InDetTrigPropagator, InDetTrigRefitRotCreator, InDetTrigBroadInDetRotCreator, \
            InDetTrigUpdator, AtlasTrackingGeometrySvc, InDetTrigMaterialUpdator
        TrigFTKTrackFitter = Trk__GlobalChi2Fitter(
            name='TrigFTKTrackFitter',
            ExtrapolationTool=InDetTrigExtrapolator,
            NavigatorTool=InDetTrigNavigator,
            PropagatorTool=InDetTrigPropagator,
            RotCreatorTool=InDetTrigRefitRotCreator,
            BroadRotCreatorTool=InDetTrigBroadInDetRotCreator,
            MeasurementUpdateTool=InDetTrigUpdator,
            TrackingGeometrySvc=AtlasTrackingGeometrySvc,
            #MaterialUpdateTool    = InDetTrigMaterialUpdator,
            StraightLine=False,
            OutlierCut=4,
            SignedDriftRadius=True,
            RecalibrateSilicon=True,
            RecalibrateTRT=True,
            ReintegrateOutliers=True,
            TrackChi2PerNDFCut=7,
            TRTExtensionCuts=False,
            MaxIterations=40,
            Acceleration=True,
            Momentum=1000.,
        )

        ToolSvc += TrigFTKTrackFitter
        if TrackFitter is None:
            self.DoFit = DoTrackFit
            self.DoTruth = False
            self.TrackFitter = TrigFTKTrackFitter

        self.UsePixelCalibSvc = UsePixelCalibSvc
        self.PixelOfflineCalibSvc = PixelConditionsSetup.instanceName(
            'PixelOfflineCalibSvc')
Exemplo n.º 2
0
    def __init__(self,
                 name="ConfiguredTrigFTKTrackConverter",
                 DoTrackFit=False,
                 DoTruth=False,
                 TrackFitter=None,
                 UsePixelCalibSvc=True):
        TrigFTKTrackConverter.__init__(self, name)
        from AthenaCommon.AppMgr import ToolSvc
        if TrackFitter is None:
            from TrkDistributedKalmanFilter.DistributedKalmanFilter_Config import ConfiguredDistributedKalmanFilter
            myTrackFitter = ConfiguredDistributedKalmanFilter()
            ToolSvc += myTrackFitter
            self.DoFit = DoTrackFit
            self.DoTruth = DoTruth
            self.TrackFitter = myTrackFitter

        self.UsePixelCalibSvc = UsePixelCalibSvc
        self.PixelOfflineCalibSvc = PixelConditionsSetup.instanceName(
            'PixelOfflineCalibSvc')
Exemplo n.º 3
0
    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
Exemplo n.º 4
0
 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
Exemplo n.º 5
0
# disabling pixel barrel layer 1 for robustness test
if 'disablePixelLayer' in dir() and disablePixelLayer == True:
  import TrigInDetValidation.InDetModules as IDM
  pixel_barrel_layer1_hashes = IDM.getHashes(IDM.getLayer(IDM.getBarrel(IDM.Pixel),1))
  # RegSelSvcDefault.DeletePixelHashList= pixel_barrel_layer1_hashes
  Service( "RegSelSvc" ).DeletePixelHashList=pixel_barrel_layer1_hashes
  #a new svc
  from TrigIDUtils.TrigIDUtilsConf import TestPixelModuleDisablingSvc
  tpmdsvc = TestPixelModuleDisablingSvc(name="TestPixelModuleDisablingSvc")
  tpmdsvc.ModuleHashes = pixel_barrel_layer1_hashes
  from AthenaCommon.AppMgr import ServiceMgr as svcMgr
  svcMgr += tpmdsvc

  from PixelConditionsTools.PixelConditionsToolsConf import PixelConditionsSummaryTool
  from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup
  InDetTrigPixelConditionsSummaryTool = PixelConditionsSummaryTool(PixelConditionsSetup.instanceName('PixelConditionsSummaryTool'))
  InDetTrigPixelConditionsSummaryTool.UseTDAQ = True

MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M"
Service ("StoreGateSvc" ).ActivateHistory=False


#from AthenaCommon.AppMgr import ServiceMgr as svcMgr                                                                                                                         
Service("TrigTimerSvc").IncludeName=".+"
#svcMgr.TrigTimerSvc.IncludeName=".+"                      

from InDetTrigRecExample.EFIDUtils import debuglevel,muondebugoff,tooldiff
#debuglevel()
#muondebugoff()
#tooldiff()
Exemplo n.º 6
0
    def createStrategy(self, instName) :
        if instName in self.settings.allowedInstanceNames :
             self.strategy = TrigL2PattRecoStrategyC("StrategyC_"+instName)
             from AthenaCommon.DetFlags    import DetFlags
             from AthenaCommon.AppMgr import ToolSvc
             from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
             from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts
             InDetTrigCutValues = EFIDTrackingCuts
             from SiSpacePointsSeedTool_xk.SiSpacePointsSeedTool_xkConf import InDet__SiSpacePointsSeedMaker_Trigger
             SeedMaker_C = InDet__SiSpacePointsSeedMaker_Trigger( name = 'InDetTrigSiSpacePointsSeedMaker_C_'+instName,
                                                                  pTmin = self.settings[('pTmin',instName)],
                                                                  maxdImpact = 5.0,
                                                                  maxZ = InDetTrigCutValues.maxZImpact(),
                                                                  minZ = -InDetTrigCutValues.maxZImpact(),
                                                                  useOverlapSpCollection   = False,
                                                                  #useOverlapSpCollection   = InDetTrigFlags.doOverlapSP(), #testing
                                                                  usePixel = DetFlags.haveRIO.pixel_on(),
                                                                  useSCT   = DetFlags.haveRIO.SCT_on(),
                                                                  SpacePointsSCTName = 'SCT_TempSpacePoints',
                                                                  SpacePointsPixelName = 'PixelTempSpacePoints',
                                                                  radMax = InDetTrigCutValues.radMax(),
                                                                  #maxNumberVertices=5,    #not fully tested
                                                                  )
             ToolSvc += SeedMaker_C
             print SeedMaker_C
             from SiZvertexTool_xk.SiZvertexTool_xkConf import InDet__SiZvertexMaker_xk
             ZvertexMaker_C = InDet__SiZvertexMaker_xk( name = 'InDetTrigZvertexMaker_C_'+instName,
                                                        Zmax = InDetTrigCutValues.maxZImpact(),
                                                        Zmin = -InDetTrigCutValues.maxZImpact(),
                                                        #SeedSize = 3,
                                                        #minContent = 10,
                                                        minRatio = 0.17 # not default
                                                        )
             ZvertexMaker_C.SeedMakerTool = SeedMaker_C
             ToolSvc += ZvertexMaker_C

             print ZvertexMaker_C

             # SCT and Pixel detector elements road builder
             from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPixelConditionsSummarySvc, InDetTrigSCTConditionsSummarySvc
             from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigSiDetElementsRoadMaker
             InDetTrigSiDetElementsRoadMaker_C = InDetTrigSiDetElementsRoadMaker.clone('InDetTrigSiDetElementsRoadMaker_C')
             InDetTrigSiDetElementsRoadMaker_C.RoadWidth = self.settings[('RoadWidth',instName)]
             ToolSvc += InDetTrigSiDetElementsRoadMaker_C

             if DetFlags.haveRIO.pixel_on():
                 from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummarySvc
                 from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup
                 InDetTrigPixelConditionsSummarySvc = PixelConditionsSummarySvc(PixelConditionsSetup.instanceName('PixelConditionsSummarySvc'))
             else:
                 InDetTrigPixelConditionsSummarySvc = None
             if DetFlags.haveRIO.SCT_on():
                 from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConditionsSummarySvc
                 from InDetTrigRecExample.InDetTrigConditionsAccess import SCT_ConditionsSetup
                 InDetTrigSCTConditionsSummarySvc = SCT_ConditionsSummarySvc(SCT_ConditionsSetup.instanceName('InDetSCT_ConditionsSummarySvc'))
             else:
                 InDetTrigSCTConditionsSummarySvc = None
             from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk
             from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPrdAssociationTool, InDetTrigPatternPropagator
             from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigPatternUpdator, InDetTrigRotCreator
             
             TrackFinder_C = InDet__SiCombinatorialTrackFinder_xk(name = 'InDetTrigSiComTrackFinder_C_'+instName,
                                                                  PropagatorTool = InDetTrigPatternPropagator,
                                                                  UpdatorTool    = InDetTrigPatternUpdator,
                                                                  RIOonTrackTool   = InDetTrigRotCreator,
                                                                  AssosiationTool  = InDetTrigPrdAssociationTool,
                                                                  usePixel         = DetFlags.haveRIO.pixel_on(),
                                                                  useSCT           = DetFlags.haveRIO.SCT_on(),
                                                                  PixelClusterContainer = 'PixelClusterCache',
                                                                  SCT_ClusterContainer = 'SCT_ClusterCache',
                                                                  PixelSummarySvc = InDetTrigPixelConditionsSummarySvc,
                                                                  SctSummarySvc = InDetTrigSCTConditionsSummarySvc)
             ToolSvc += TrackFinder_C
             from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk

             TrackMaker_C = InDet__SiTrackMaker_xk( name = 'InDetTrigSiTrackMaker_C_'+instName,
                                                    RoadTool       = InDetTrigSiDetElementsRoadMaker_C,
                                                    CombinatorialTrackFinder = TrackFinder_C,
                                                    pTmin          = self.settings[('pTmin',instName)],
                                                    nClustersMin   = self.settings[('nClustersMin',instName)],
                                                    nHolesMax      = self.settings[('nHolesMax',instName)],
                                                    nHolesGapMax   = self.settings[('nHolesGapMax',instName)],
                                                    SeedsFilterLevel = InDetTrigCutValues.seedFilterLevel(),
                                                    Xi2max         = 15.0,
                                                    Xi2maxNoAdd    = 15.0,
                                                    nWeightedClustersMin= 8,
                                                    UseAssociationTool       = False)
             ToolSvc += TrackMaker_C
             print TrackMaker_C
             self.strategy.SeedsTool = SeedMaker_C
             self.strategy.ZvertexTool = ZvertexMaker_C
             #strategy.useZvertexTool = InDetTrigFlags.useZvertexTool()
             self.strategy.useZvertexTool = self.settings[('useZvertexTool',instName)]
             #self.useZvertexTool = False
             self.strategy.TrackTool = TrackMaker_C
             return self.strategy
        else :
            print "Instance "+instName+" of the Strategy C is not supported !"
            return None
Exemplo n.º 7
0
    import TrigInDetValidation.InDetModules as IDM
    pixel_barrel_layer1_hashes = IDM.getHashes(
        IDM.getLayer(IDM.getBarrel(IDM.Pixel), 1))
    # RegSelSvcDefault.DeletePixelHashList= pixel_barrel_layer1_hashes
    Service("RegSelSvc").DeletePixelHashList = pixel_barrel_layer1_hashes
    #a new svc
    from TrigIDUtils.TrigIDUtilsConf import TestPixelModuleDisablingSvc
    tpmdsvc = TestPixelModuleDisablingSvc(name="TestPixelModuleDisablingSvc")
    tpmdsvc.ModuleHashes = pixel_barrel_layer1_hashes
    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
    svcMgr += tpmdsvc

    from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummarySvc
    from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup
    InDetTrigPixelConditionsSummarySvc = PixelConditionsSummarySvc(
        PixelConditionsSetup.instanceName('PixelConditionsSummarySvc'))
    InDetTrigPixelConditionsSummarySvc.UseTDAQ = True
    InDetTrigPixelConditionsSummarySvc.TDAQSvcName = "TestPixelModuleDisablingSvc/TestPixelModuleDisablingSvc"

MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M"
Service("StoreGateSvc").ActivateHistory = False

#from AthenaCommon.AppMgr import ServiceMgr as svcMgr
Service("TrigTimerSvc").IncludeName = ".+"
#svcMgr.TrigTimerSvc.IncludeName=".+"

from InDetTrigRecExample.EFIDUtils import debuglevel, muondebugoff, tooldiff
#debuglevel()
#muondebugoff()
#tooldiff()