Esempio n. 1
0
# Input file
dataFile="/eos/atlas/atlascerngroupdisk/phys-rig/MC15Samples/ESD/mc15_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s2832_r7968/ESD.08355655._001904.pool.root.1"

from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
athenaCommonFlags.FilesInput=[dataFile,dataFile]

# AutoConfiguration
from RecExConfig.RecFlags import rec
rec.AutoConfiguration = ['everything']
import RecExConfig.AutoConfiguration as auto
auto.ConfigureFromListOfKeys(rec.AutoConfiguration())

from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore
from RecExConfig.InputFilePeeker import inputFileSummary
objKeyStore.addManyTypesInputFile(inputFileSummary['eventdata_itemsList'])

#---------------------------------------------------------------------------------#
# Detector Description
from AtlasGeoModel import SetGeometryVersion
from AtlasGeoModel import GeoModelInit

from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
from TileGeoModel.TileGeoModelConf import TileDetectorTool

ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"),
                                          TileDetectorTool(GeometryConfig = "RECO")
                                          ]


from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv
Esempio n. 2
0
# Input file
dataFile = "/afs/cern.ch/atlas/project/rig/referencefiles/MC/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.e3099_s2578/RDO.04919495._000958.pool.root.1"

from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
athenaCommonFlags.FilesInput=[dataFile,dataFile]

# AutoConfiguration
from RecExConfig.RecFlags import rec
rec.AutoConfiguration = ['everything']
import RecExConfig.AutoConfiguration as auto
auto.ConfigureFromListOfKeys(rec.AutoConfiguration())

from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore
from PyUtils.MetaReaderPeeker import convert_itemList
objKeyStore.addManyTypesInputFile(convert_itemList(layout = '#join'))

#---------------------------------------------------------------------------------#
# Detector Description
from AtlasGeoModel import SetGeometryVersion
from AtlasGeoModel import GeoModelInit

from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
from TileGeoModel.TileGeoModelConf import TileDetectorTool

ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"),
                                          TileDetectorTool(GeometryConfig = "RECO")
                                          ]


from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv
Esempio n. 3
0
    def configure(self):

        log = logging.getLogger("HLTTriggergetter.py")

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        # If no xAOD::EventInfo is found in a POOL file, schedule conversion from old EventInfo
        from AthenaCommon.GlobalFlags import globalflags
        if globalflags.InputFormat.is_pool():
            from RecExConfig.ObjKeyStore import objKeyStore
            from PyUtils.MetaReaderPeeker import convert_itemList
            objKeyStore.addManyTypesInputFile(convert_itemList(layout='#join'))
            from AthenaCommon.AlgSequence import AthSequencer
            condSeq = AthSequencer("AthCondSeq")
            if (not objKeyStore.isInInput("xAOD::EventInfo")) and (not hasattr(
                    condSeq, "xAODMaker::EventInfoCnvAlg")):
                from xAODEventInfoCnv.xAODEventInfoCnvAlgDefault import xAODEventInfoCnvAlgDefault
                xAODEventInfoCnvAlgDefault(sequence=condSeq)

        if jobproperties.Global.InputFormat() == 'bytestream':
            # Decode ROIB::RoIBResult from ByteStream
            from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
            L1ByteStreamDecodersRecExSetup()

        log.info("Loading RegionSelector")
        from AthenaCommon.AppMgr import ServiceMgr
        from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
        ServiceMgr += RegSelSvcDefault()

        # Configure the Data Preparation for Calo
        if TriggerFlags.doCalo():
            try:
                from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess
                ServiceMgr.ToolSvc += TrigDataAccess()
            except ImportError:
                include('TrigT2CaloCommon/TrigDataAccessConfigured.py')

        if TriggerFlags.doFTK():
            # FTK algorithm inclusions
            # TrigFTK_DataProviderSvc moved to TrigFTK_RecExample
            pass

        if TriggerFlags.doHLT():
            log.info("configuring HLT Steering")

            from TrigSteering.TrigSteeringConfig import TrigSteer_HLT, ReruningTrigSteer_HLT
            if TriggerFlags.doFEX():

                # schedule the conversion of the L1Calo ROIB data to topo simulation input

                # this ROIB converter should only be scheduled if
                # - we run on data
                # - L1Calo simulation has not been scheduled
                # - and ROIB converter has not been scheduled yet before
                if globalflags.DataSource()=='data' \
                       and not hasattr( topSequence, 'CPCMX' ) \
                       and not hasattr( topSequence, 'RoiB2TopoInputDataCnv' ):
                    log.info("Setting up RoiB2TopoInputDataCnv")
                    from L1TopoSimulation.L1TopoSimulationConfig import RoiB2TopoInputDataCnv
                    roib2Topo = RoiB2TopoInputDataCnv()
                    topSequence += roib2Topo

                log.info(
                    "configuring HLT merged system, for normal running (FEX + Hypo)"
                )
                TrigSteer_HLT = TrigSteer_HLT(
                    'TrigSteer_HLT',
                    hltFile=TriggerFlags.inputHLTconfigFile(),
                    lvl1File=TriggerFlags.inputLVL1configFile())
                TrigSteer_HLT.doHypo = TriggerFlags.doHypo()

            if not TriggerFlags.doFEX() and TriggerFlags.doHypo():
                log.info("configuring merged HLT for re-running (Hypo only)")
                TrigSteer_HLT = ReruningTrigSteer_HLT(
                    'TrigSteer_HLT',
                    hltFile=TriggerFlags.inputHLTconfigFile(),
                    lvl1File=TriggerFlags.inputLVL1configFile())

            # TrigSteer_HLT.doL1TopoSimulation = TriggerFlags.doL1Topo() # this later needs to be extented to also run when we take data with L1Topo
            TrigSteer_HLT.doL1TopoSimulation = True  # always needs to run if the HLT is simulated
            if hasattr(TrigSteer_HLT.LvlTopoConverter, 'MuonInputProvider'):

                try:  # this is temporary until TrigT1Muctpi-00-06-29 is in the release
                    from TrigT1Muctpi.TrigT1MuctpiConfig import L1MuctpiTool
                    from AthenaCommon.AppMgr import ToolSvc
                    ToolSvc += L1MuctpiTool()
                    TrigSteer_HLT.LvlTopoConverter.MuonInputProvider.MuctpiSimTool = L1MuctpiTool(
                    )
                except ImportError:
                    pass

                from AthenaCommon.GlobalFlags import globalflags
                if globalflags.DataSource() != 'data':
                    log.info(
                        "Muon eta/phi encoding with reduced granularity for MC (L1Topo emulation for HLT seeding)"
                    )
                    TrigSteer_HLT.LvlTopoConverter.MuonInputProvider.MuonEncoding = 1  # reduced granularity muon input
                else:
                    log.info(
                        "Muon eta/phi encoding with full granularity for data (L1Topo emulation for HLT seeding) - should be faced out"
                    )
                    TrigSteer_HLT.LvlTopoConverter.MuonInputProvider.MuonEncoding = 0  # full granularity muon input - should be faced out

            from TrigEDMConfig.TriggerEDM import getHLTPreregistrationList, getEDMLibraries
            TrigSteer_HLT.Navigation.ClassesToPreregister = getHLTPreregistrationList(
            )

            TrigSteer_HLT.Navigation.Dlls = getEDMLibraries()

            monitoringTools(TrigSteer_HLT)
            topSequence += TrigSteer_HLT

        if TriggerFlags.writeBS():
            # declare objects to go to BS (from the lists above)
            ## if TriggerFlags.doLVL2():
            ##     from TrigEDMConfig.TriggerEDM import getL2BSList
            ##     TrigSteer_L2.Navigation.ClassesToPayload = getL2BSList()
            ##     TrigSteer_L2.Navigation.ClassesToPreregister = []
            ##
            ## if TriggerFlags.doEF():
            ##     from TrigEDMConfig.TriggerEDM import getEFBSList
            ##     TrigSteer_EF.Navigation.ClassesToPayload = getEFBSList()
            ##     TrigSteer_EF.Navigation.ClassesToPreregister = []
            ##     try:
            ##         from TrigEDMConfig.TriggerEDM import getEFDSList
            ##         TrigSteer_EF.Navigation.ClassesToPayload_DSonly = getEFDSList()
            ##     except ImportError:
            ##         log.warning("DataScouting not available in this release")

            if TriggerFlags.doHLT():
                from TrigEDMConfig.TriggerEDM import getHLTBSList
                TrigSteer_HLT.Navigation.ClassesToPayload = getHLTBSList()
                TrigSteer_HLT.Navigation.ClassesToPreregister = []
                try:
                    from TrigEDMConfig.TriggerEDM import getHLTDSList
                    TrigSteer_HLT.Navigation.ClassesToPayload_DSonly = getHLTDSList(
                    )
                except ImportError:
                    log.warning("DataScouting not available in this release")

            #configure tools for serialization
            from TrigSerializeTP.TrigSerializeTPConf import TrigSerTPTool
            TrigSerToolTP = TrigSerTPTool('TrigSerTPTool')
            from TrigEDMConfig.TriggerEDM import getTPList
            TrigSerToolTP.TPMap = getTPList(TriggerFlags.doHLT())
            from AthenaCommon.AppMgr import ToolSvc
            ToolSvc += TrigSerToolTP

            from TrigSerializeCnvSvc.TrigSerializeCnvSvcConf import TrigSerializeConvHelper
            TrigSerializeConvHelper = TrigSerializeConvHelper(doTP=True)
            ToolSvc += TrigSerializeConvHelper

            #do not activate T/P of EF classes at L2
            ## if TriggerFlags.doLVL2():
            ##     from TrigEDMConfig.TriggerEDM import getL2BSTypeList
            ##     TrigSerToolTP.ActiveClasses = getL2BSTypeList()
            ## if TriggerFlags.doEF():
            ##     from TrigEDMConfig.TriggerEDM import getL2BSTypeList, getEFBSTypeList
            ##     TrigSerToolTP.ActiveClasses = getL2BSTypeList() + getEFBSTypeList()

            if TriggerFlags.doHLT():
                from TrigEDMConfig.TriggerEDM import getHLTBSTypeList
                TrigSerToolTP.ActiveClasses = getHLTBSTypeList()

        from TriggerJobOpts.HLTTriggerResultGetter import HLTTriggerResultGetter
        result = HLTTriggerResultGetter()  # noqa: F841
        return True