Exemplo n.º 1
0
def MuidSegmentRegionRecoveryTool( name ='MuidSegmentRegionRecoveryTool', **kwargs ):
    kwargs.setdefault("Builder",  getPublicTool("CombinedMuonTrackBuilderFit") )
    import MuonCombinedRecExample.CombinedMuonTrackSummary
    from AthenaCommon.AppMgr import ToolSvc
    kwargs.setdefault("TrackSummaryTool", ToolSvc.CombinedMuonTrackSummary)

    from RegionSelector.RegSelToolConfig import makeRegSelTool_MDT, makeRegSelTool_RPC, makeRegSelTool_TGC
    kwargs.setdefault("MDTRegionSelector", makeRegSelTool_MDT())
    kwargs.setdefault("RPCRegionSelector", makeRegSelTool_RPC())
    kwargs.setdefault("TGCRegionSelector", makeRegSelTool_TGC())
    if MuonGeometryFlags.hasCSC():
        from RegionSelector.RegSelToolConfig import makeRegSelTool_CSC
        kwargs.setdefault("CSCRegionSelector", makeRegSelTool_CSC())
    else:
        kwargs.setdefault("CSCRegionSelector", "")
    if MuonGeometryFlags.hasSTGC():
        from RegionSelector.RegSelToolConfig import makeRegSelTool_sTGC
        kwargs.setdefault("STGCRegionSelector", makeRegSelTool_sTGC())
    else:
        kwargs.setdefault("STGCRegionSelector", "")
    if MuonGeometryFlags.hasMM():
        from RegionSelector.RegSelToolConfig import makeRegSelTool_MM
        kwargs.setdefault("MMRegionSelector", makeRegSelTool_MM())
    else:
        kwargs.setdefault("MMRegionSelector", "")

    return CfgMgr.Muon__MuonSegmentRegionRecoveryTool(name,**kwargs)
Exemplo n.º 2
0
    def __init__(self, name="MuonSegmentRegionRecoveryTool", **kwargs):
        #MDT conditions information not available online
        if (athenaCommonFlags.isOnline):
            kwargs.setdefault("MdtCondKey", "")
        from RegionSelector.RegSelToolConfig import makeRegSelTool_MDT, makeRegSelTool_RPC, makeRegSelTool_TGC
        kwargs.setdefault("MDTRegionSelector", makeRegSelTool_MDT())
        kwargs.setdefault("RPCRegionSelector", makeRegSelTool_RPC())
        kwargs.setdefault("TGCRegionSelector", makeRegSelTool_TGC())
        if MuonGeometryFlags.hasCSC():
            from RegionSelector.RegSelToolConfig import makeRegSelTool_CSC
            kwargs.setdefault("CSCRegionSelector", makeRegSelTool_CSC())
        else:
            kwargs.setdefault("CSCRegionSelector", "")
        if MuonGeometryFlags.hasSTGC():
            from RegionSelector.RegSelToolConfig import makeRegSelTool_sTGC
            kwargs.setdefault("STGCRegionSelector", makeRegSelTool_sTGC())
        else:
            kwargs.setdefault("STGCRegionSelector", "")
        if MuonGeometryFlags.hasMM():
            from RegionSelector.RegSelToolConfig import makeRegSelTool_MM
            kwargs.setdefault("MMRegionSelector", makeRegSelTool_MM())
        else:
            kwargs.setdefault("MMRegionSelector", "")

        self.applyUserDefaults(kwargs, name)
        super(MuonSegmentRegionRecoveryTool, self).__init__(name, **kwargs)
Exemplo n.º 3
0
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

######################## RPC rdo to prd

from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool
RpcRdoToPrepDataTool = Muon__RpcRdoToPrepDataTool("RpcPrepDataProviderTool")
# property had to be removed for technical reasons
# RpcRdoToPrepDataTool.dumpOffToOnlineMapToFile = False
ToolSvc += RpcRdoToPrepDataTool

from MuonRdoToPrepData.MuonRdoToPrepDataConf import RpcRdoToRpcPrepData
RpcRdoToRpcPrepData = RpcRdoToRpcPrepData()
RpcRdoToRpcPrepData.PrintPrepData = False
from RegionSelector.RegSelToolConfig import makeRegSelTool_RPC
RpcRdoToRpcPrepData.RegSel_RPC = makeRegSelTool_RPC()

topSequence += RpcRdoToRpcPrepData
######################## end of RPC rdo to prd

######################## CSC rdo to prd and clusterization
#
#from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataTool
#CscRdoToPrepDataTool = Muon__CscRdoToCscPrepDataTool("CscPrepDataProviderTool")
#ToolSvc += CscRdoToPrepDataTool
#
#from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData
#CscRdoToCscPrepData = CscRdoToCscPrepData()
#CscRdoToCscPrepData.PrintPrepData = False
#
#topSequence += CscRdoToCscPrepData
Exemplo n.º 4
0
    def __init__(self, name, *args, **kwargs):
        super(TrigL2MuonSAConfig, self).__init__(name)

        self.DataPreparator = theDataPreparator
        self.PatternFinder = MuonSA.TrigL2MuonSA__MuFastPatternFinder()
        self.StationFitter = theStationFitter
        self.TrackFitter = MuonSA.TrigL2MuonSA__MuFastTrackFitter()
        self.TrackExtrapolator = MuonSA.TrigL2MuonSA__MuFastTrackExtrapolator()

        import MuonCnvExample.MuonCablingConfig  # noqa: F401 configuration of Run 2 cabling by import
        self.DataPreparator.MDTDataPreparator.RegSel_MDT = makeRegSelTool_MDT()
        self.DataPreparator.RPCDataPreparator.RegSel_RPC = makeRegSelTool_RPC()
        self.DataPreparator.TGCDataPreparator.RegSel_TGC = makeRegSelTool_TGC()
        self.DataPreparator.CSCDataPreparator.RegSel_CSC = makeRegSelTool_CSC()

        self.R_WIDTH_TGC_FAILED = 200
        self.R_WIDTH_RPC_FAILED = 400

        self.DoCalibrationStream = False

        self.USE_ROIBASEDACCESS_CSC = True

        self.RpcErrToDebugStream = True

        MuonSA.MuFastSteering.topoRoad = True
        MuonSA.MuFastSteering.dEtasurrRoI = 0.14
        MuonSA.MuFastSteering.dPhisurrRoI = 0.14

        if TriggerFlags.run2Config == '2016':
            self.UseEndcapInnerFromBarrel = False
        else:
            self.UseEndcapInnerFromBarrel = True

        if (args[0] == '900GeV'):
            self.WinPt = 4.0
            self.Scale_Road_BarrelInner = 3
            self.Scale_Road_BarrelMiddle = 3
            self.Scale_Road_BarrelOuter = 3
        else:
            self.WinPt = 6.0
            self.Scale_Road_BarrelInner = 1
            self.Scale_Road_BarrelMiddle = 1
            self.Scale_Road_BarrelOuter = 1

        if (args[0] == 'MuonCalib'):
            self.DoCalibrationStream = True
            self.MuonCalDataScouting = False
            self.MuonCalBufferSize = 1024 * 1024

        if (args[0] == 'MuonCalibDataScouting'):
            self.DoCalibrationStream = True
            self.MuonCalDataScouting = True
            self.MuonCalBufferSize = 1024 * 1024

        self.Timing = False

        # Default backextrapolator is for MC Misaligned Detector
        self.BackExtrapolator = MuonBackExtrapolatorForMisalignedDet()

        # Monitoring system used by Run-2
        # Histograms for monitored variables
        #from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
        #validation = TrigL2MuonSAValidationMonitoring()
        #online     = TrigL2MuonSAOnlineMonitoring()
        #cosmic     = TrigL2MuonSACosmicMonitoring()
        #time       = TrigTimeHistToolConfig('TimeHisto')

        #self.AthenaMonTools = [ validation, online, cosmic, time ]
        self.AthenaMonTools = []

        def setDefaults(cls, handle):
            if hasattr(handle, 'BackExtrapolator'):
                if handle.BackExtrapolator.name().find(
                        "AlignedBackExtrapolator") != -1:
                    log.info("using BackExtrapolatorLUT for Aligned Detector")
                if handle.BackExtrapolator.name().find(
                        "MisalignedBackExtrapolator") != -1:
                    log.info(
                        "using BackExtrapolatorLUT for Misligned Detector")
                if handle.BackExtrapolator.name().find(
                        "DataBackExtrapolator") != -1:
                    log.info("using BackExtrapolatorLUT for Data")

        if TriggerFlags.run2Config == '2016':
            self.StationFitter.PtFromAlphaBeta.useCscPt = False
            self.StationFitter.PtFromAlphaBeta.AvoidMisalignedCSCs = True
        else:
            self.StationFitter.PtFromAlphaBeta.useCscPt = True
            self.StationFitter.PtFromAlphaBeta.AvoidMisalignedCSCs = True
Exemplo n.º 5
0
if muonRecFlags.doMDTs() and DetFlags.makeRIO.MDT_on() and (
        DetFlags.haveRDO.MDT_on() or DetFlags.digitize.MDT_on()):
    topSequence += getAlgorithm("MdtRdoToMdtPrepData",
                                tryDefaultConfigurable=True)
    topSequence.MdtRdoToMdtPrepData.DecodingTool = MdtPrepDataProviderTool()
    from RegionSelector.RegSelToolConfig import makeRegSelTool_MDT
    topSequence.MdtRdoToMdtPrepData.RegSel_MDT = makeRegSelTool_MDT()

if muonRecFlags.doRPCs() and DetFlags.makeRIO.RPC_on() and (
        DetFlags.haveRDO.RPC_on() or DetFlags.digitize.RPC_on()):
    topSequence += getAlgorithm("RpcRdoToRpcPrepData",
                                tryDefaultConfigurable=True)
    topSequence.RpcRdoToRpcPrepData.DecodingTool = RpcPrepDataProviderTool()
    from RegionSelector.RegSelToolConfig import makeRegSelTool_RPC
    topSequence.RpcRdoToRpcPrepData.RegSel_RPC = makeRegSelTool_RPC()

if muonRecFlags.doTGCs() and DetFlags.makeRIO.TGC_on() and (
        DetFlags.haveRDO.TGC_on() or DetFlags.digitize.TGC_on()):
    topSequence += getAlgorithm("TgcRdoToTgcPrepData",
                                tryDefaultConfigurable=True)
    topSequence.TgcRdoToTgcPrepData.DecodingTool = TgcPrepDataProviderTool()
    from RegionSelector.RegSelToolConfig import makeRegSelTool_TGC
    topSequence.TgcRdoToTgcPrepData.RegSel_TGC = makeRegSelTool_TGC()

if not muonRecFlags.doFastDigitization():
    if (MuonGeometryFlags.hasSTGC() and MuonGeometryFlags.hasMM()):
        if muonRecFlags.dosTGCs() and DetFlags.makeRIO.sTGC_on() and (
                DetFlags.haveRDO.sTGC_on() or DetFlags.digitize.sTGC_on()):
            topSequence += getAlgorithm("StgcRdoToStgcPrepData",
                                        tryDefaultConfigurable=True)