Ejemplo 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)
Ejemplo 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)
Ejemplo n.º 3
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
Ejemplo n.º 4
0
# Setup cabling svc
import MuonCnvExample.MuonCablingConfig

# Input data set
import AthenaPoolCnvSvc.ReadAthenaPool
ServiceMgr.EventSelector.InputCollections = [
    'rfio:/castor/cern.ch/grid/atlas/atlasgroupdisk/proj-sit/willocq/1510/digi/MC8.107233.singlepart_mu100.digi.pool.1.root'
    ]

# The number of events to be processed
theApp.EvtMax = 100

# AlgSequence
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

# MuonTGC_CnvTools
from MuonTGC_CnvTools.MuonTGC_CnvToolsConf import Muon__TgcRdoToPrepDataTool
TgcRdoToPrepDataTool = Muon__TgcRdoToPrepDataTool("TgcPrepDataProviderTool")
TgcRdoToPrepDataTool.OutputLevel = INFO
ToolSvc += TgcRdoToPrepDataTool
print TgcRdoToPrepDataTool

# TgcRdoToTgcPrepData
from MuonRdoToPrepData.MuonRdoToPrepDataConf import TgcRdoToTgcPrepData
TgcRdoToTgcPrepData = TgcRdoToTgcPrepData()
TgcRdoToTgcPrepData.PrintPrepData = True
from RegionSelector.RegSelToolConfig import makeRegSelTool_TGC
TgcRdoToTgcPrepData.RegSel_TGC = makeRegSelTool_TGC()
topSequence += TgcRdoToTgcPrepData
Ejemplo n.º 5
0
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)
        if muonRecFlags.doMicromegas() and DetFlags.makeRIO.Micromegas_on(
        ) and (DetFlags.haveRDO.Micromegas_on()
               or DetFlags.digitize.Micromegas_on()):
            topSequence += getAlgorithm("MM_RdoToMM_PrepData",
                                        tryDefaultConfigurable=True)

#
# Remove hits from part of the detector to mimic dead channels