コード例 #1
0
def oldStyle():
    from TriggerJobOpts.TriggerFlags import TriggerFlags
    oldStylePrescales = 'pp_v4' in TriggerFlags.triggerMenuSetup() or \
                        'HI_v2' in TriggerFlags.triggerMenuSetup() or \
                        'alfa_v2' in TriggerFlags.triggerMenuSetup() or \
                        'DC14' in TriggerFlags.triggerMenuSetup()
    return oldStylePrescales
コード例 #2
0
def oldStyle():
    from TriggerJobOpts.TriggerFlags import TriggerFlags
    oldStylePrescales = 'pp_v4' in TriggerFlags.triggerMenuSetup() or \
                        'HI_v2' in TriggerFlags.triggerMenuSetup() or \
                        'alfa_v2' in TriggerFlags.triggerMenuSetup() or \
                        'DC14' in TriggerFlags.triggerMenuSetup()
    return oldStylePrescales
コード例 #3
0
    def setupTempCOOLWriting(self,TrigCoolDbConnection):
        log = logging.getLogger( "TriggerConfigGetter.py" )

        log.info( 'Trigger the copying of COOL data into DetectorStore. I am not certain this is needed any longer JS.')

        # if we have MC data (nothing in ORACLE/COOL) we need to write an SQlite file
        # and change the dbConnection
        if ( self.readMC \
             or (self.isCommisioning and (TriggerFlags.readLVL1configFromXML and TriggerFlags.readHLTconfigFromXML)) \
             or TriggerFlags.readMenuFromTriggerDb ):

            log.info( 'TempCoolSetup: Setting up the writing of a temporary COOL DB')

            from TrigConfigSvc.TrigConf2COOL import theConfCOOLWriter
            if self.readTriggerDB:
                log.info("TempCoolSetup: source is db [%s] with keys %s/%s/%s", TriggerFlags.triggerDbConnection(),TriggerFlags.triggerDbKeys()[0],TriggerFlags.triggerDbKeys()[1],TriggerFlags.triggerDbKeys()[2])
                theConfCOOLWriter.smk        = TriggerFlags.triggerDbKeys()[0]
                theConfCOOLWriter.l1psk      = TriggerFlags.triggerDbKeys()[1]
                theConfCOOLWriter.hltpsk     = TriggerFlags.triggerDbKeys()[2]
                theConfCOOLWriter.setTriggerDBConnection(self.trigDbConnectionParameters)
            else:
                log.info("TempCoolSetup: sources are '%s' and '%s'", self.svc.l1XmlFile,self.svc.hltXmlFile)
                theConfCOOLWriter.lvl1menu = self.svc.l1XmlFile
                theConfCOOLWriter.hltmenu  = self.svc.hltXmlFile
            if TrigCoolDbConnection == "": # nothing specified by the user
                TrigCoolDbConnection = re.match(".*;schema=(.*);dbname=.*",theConfCOOLWriter.dbConnection).group(1)
                theConfCOOLWriter.isWritingNeeded = True
                log.info("TempCoolSetup: Setting TrigCoolDbConnection to %s", TrigCoolDbConnection )
                log.info("TempCoolSetup: Enabling writing and IOV adjustment")

        return TrigCoolDbConnection
コード例 #4
0
    def __init__(self, name):
        super(EgammaFastElectronFexBase,self).__init__(name)

        # Tracking cuts
        self.TrackPt = 1.0 * GeV
        self.TrackPtHighEt = 2.0 * GeV
        self.ClusEt = 20.0 * GeV
        self.CaloTrackdEtaNoExtrap = 0.5
        self.CaloTrackdEtaNoExtrapHighEt = 0.1
        # Calo-Tracking matching cuts
        self.CaloTrackdETA = 0.5
        self.CaloTrackdPHI = 0.5
        self.CaloTrackdEoverPLow  = 0.0
        self.CaloTrackdEoverPHigh = 999.0

        self.ParticleCaloExtensionTool = ParticleCaloExtensionTool

        from TriggerJobOpts.TriggerFlags import TriggerFlags
        if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in  TriggerFlags.enableMonitoring():
            monTool = GenericMonitoringTool('MonTool')
            monTool.defineHistogram('CaloTrackdEta', path='EXPERT', type='TH1F', title="FastElectron Hypo #Delta #eta between cluster and track;#Delta #eta;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
            monTool.defineHistogram('CaloTrackdPhi', path='EXPERT', type='TH1F', title="FastElectron Hypo #Delta #phi between cluster and track;#Delta #phi;Nevents", xbins=80, xmin=-0.4, xmax=0.4)
            monTool.defineHistogram('CaloTrackEoverP', path='EXPERT', type='TH1F', title="FastElectron Hypo E/p;E/p;Nevents", xbins=120, xmin=0, xmax=12)
            monTool.defineHistogram('PtTrack', path='EXPERT', type='TH1F', title="FastElectron Hypo p_{T}^{track} [MeV];p_{T}^{track} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
            monTool.defineHistogram('PtCalo', path='EXPERT', type='TH1F', title="FastElectron Hypo p_{T}^{calo} [MeV];p_{T}^{calo} [MeV];Nevents", xbins=50, xmin=0, xmax=100000)
            monTool.defineHistogram('CaloEta',path='EXPERT',  type='TH1F', title="FastElectron Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5)
            monTool.defineHistogram('CaloPhi', path='EXPERT', type='TH1F', title="FastElectron Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2)
            monTool.defineHistogram('CaloTrackdEtaNoExtrapMon', path='EXPERT',type='TH1F', title="FastElectron Fex #Delta #eta between cluster and track;#Delta #eta;Nevents", xbins=80, xmin=-0.4, xmax=0.4)

            self.MonTool = monTool
コード例 #5
0
 def setDefaults(self, handle):
     from TriggerJobOpts.TriggerFlags import TriggerFlags
     handle.DoCalo = TriggerFlags.doCalo()
     handle.DoMuon = TriggerFlags.doMuon()
     handle.DoBCM = TriggerFlags.doBcm()
     handle.DoLUCID = TriggerFlags.doLucid()
     handle.DoZDC = TriggerFlags.doZdc()
コード例 #6
0
    def configure(self):
        log = logging.getLogger("ByteStreamUnpackGetter")

        log.info("TriggerFlags.dataTakingConditions: %s",
                 TriggerFlags.dataTakingConditions())
        hasHLT = TriggerFlags.dataTakingConditions(
        ) == 'HltOnly' or TriggerFlags.dataTakingConditions() == 'FullTrigger'
        if not hasHLT:
            log.info(
                "Will not configure HLT BS unpacking because dataTakingConditions flag indicates HLT was disabled"
            )
            return True

        # Define the decoding sequence
        from TrigHLTResultByteStream.TrigHLTResultByteStreamConf import HLTResultMTByteStreamDecoderAlg
        from TrigOutputHandling.TrigOutputHandlingConf import TriggerEDMDeserialiserAlg
        from AthenaCommon.CFElements import seqAND
        decoder = HLTResultMTByteStreamDecoderAlg()
        deserialiser = TriggerEDMDeserialiserAlg("TrigDeserialiser")
        decodingSeq = seqAND("HLTDecodingSeq")
        decodingSeq += decoder  # BS -> HLTResultMT
        decodingSeq += deserialiser  # HLTResultMT -> xAOD

        # Append the decoding sequence to topSequence
        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()
        topSequence += decodingSeq

        log.debug("Configured HLT result BS decoding sequence")
        return True
コード例 #7
0
  def generatePyCode(self, algos):
    #create python code to be executed
    alglist = "["
    for i in algos:
      #self.__algos__.append(i)
      algline = self._item_line(i[0], i[1])
      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 = '[dummyAlgEFID]'

    algseq = []
    try:
      algseq = eval (alglist)
    except:
      from sys import exc_info
      (a,reason,c) = exc_info()
      print (reason)
      log.error("Cannot create ID tracking sequence %s, leaving empty" % alglist)
      import traceback
      traceback.print_exc()

      #raise Exception

    log.debug('%s ' % algseq)  

    self.__sequence__.append(algseq)
    pass
コード例 #8
0
    def __init__(self, name='L1Decoder', *args, **kwargs):
        super(L1Decoder, self).__init__(name, *args, **kwargs)

        from TriggerJobOpts.TriggerFlags import TriggerFlags

        # CTP unpacker
        ctpUnpacker = CompFactory.CTPUnpackingTool()

        self.ctpUnpacker = ctpUnpacker
        from TrigEDMConfig.TriggerEDMRun3 import recordable
        self.roiUnpackers += [ CompFactory.FSRoIsUnpackingTool("FSRoIsUnpackingTool",
                                                               Decisions=mapThresholdToL1DecisionCollection("FSNOSEED"),
                                                               OutputTrigRoIs = recordable(mapThresholdToL1RoICollection("FSNOSEED") )) ]
        # EM unpacker
        if TriggerFlags.doID() or TriggerFlags.doCalo():
            unpackers, rerunUnpackers = createCaloRoIUnpackers()
            self.roiUnpackers += unpackers
            self.rerunRoiUnpackers += rerunUnpackers

        # MU unpacker
        if TriggerFlags.doMuon():
            unpackers, rerunUnpackers = createMuonRoIUnpackers()
            self.roiUnpackers += unpackers
            self.rerunRoiUnpackers += rerunUnpackers

        self.prescaler = createPrescalingTool()

        from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
        self.DoCostMonitoring = flags.Trigger.CostMonitoring.doCostMonitoring
        self.CostMonitoringChain = flags.Trigger.CostMonitoring.chain

        self.L1DecoderSummaryKey = "L1DecoderSummary"
コード例 #9
0
    def getAlgorithmsByLevel(self):
        """Produces pair of lists with algorithms scheduled for  L2 and EF"""

        mlog = logging.getLogger("TrigConfigSvcConfig.py")
        from TriggerJobOpts.TriggerFlags import TriggerFlags
        if TriggerFlags.readMenuFromTriggerDb():
            from TrigConfigSvc.TrigConfigSvcUtils import getAlgorithmsForMenu
            mlog.info("Will load algos from DB")
            l2algs, efalgs = getAlgorithmsForMenu(TriggerFlags.triggerDbConnection(),TriggerFlags.triggerDbKeys()[0])
        else:
            mlog.info("Will load algos from xml")
            l2algs = []
            efalgs = []
            doc = ET.parse(self.XMLMenuFile)
            algs = self.getAllAlgorithms(doc)
            l2TEs, efTEs = self.getTEsByLevel(doc)
            
            for te in l2TEs:
                if te in algs.keys():
                    l2algs += algs[te]

            for te in efTEs:
                if te in algs.keys():
                    efalgs += algs[te]
                    
        return l2algs, efalgs
コード例 #10
0
    def checkInput(self):
        self.checkFileMetaData()

        log = logging.getLogger( "TriggerConfigGetter.py" )
        if "ReadPool" in self._environment or "WritePool" in self._environment:
            log.info("Flags are ignored, since 'ReadPool' or  'WritePool' is specified")
            return True

        if rec.readESD() or rec.readAOD(): # and globalflags.DataSource()=='data':  # need this for MC as well
            protectedInclude("TriggerJobOpts/TriggerConfigCheckMetadata.py")

        if rec.readRDO() and globalflags.InputFormat()=='bytestream' and globalflags.DataSource()=='data' and TriggerFlags.configForStartup()!='HLToffline':
            protectedInclude("TriggerJobOpts/TriggerConfigCheckHLTpsk.py")

        log.info("The following flags are set:")
        log.info("globalflags.InputFormat             : %s", globalflags.InputFormat())
        log.info("rec.read.*                          : RDO: %s, ESD: %s, AOD: %s, TAG: %s", rec.readRDO(), rec.readESD(), rec.readAOD(), rec.readTAG())
        log.info("rec.doWrite.*                       : ESD: %s, AOD: %s, TAG: %s", rec.doWriteESD(), rec.doWriteAOD(), rec.doWriteTAG())
        log.info("globalflags.DataSource              : %s", globalflags.DataSource())
        log.info("TriggerFlags.configForStartup       : %s", TriggerFlags.configForStartup())
        log.info("TriggerFlags.dataTakingConditions   : %s", TriggerFlags.dataTakingConditions())
        log.info("TriggerFlags.configurationSourceList: %s", TriggerFlags.configurationSourceList())

        count = len([1 for x in [rec.readRDO(),rec.readESD(),rec.readAOD()] if x ]) #readTAG is only set with another input
        if count == 0:
            log.warning("Don't know what the input format is.")
            return False
        if count >= 2:
            log.warning("More than one input format specified, please set only the appropriate one.")
            return False
        return True
コード例 #11
0
        def InitialiseSvc(self):
            if self.initialised:
                raise (RuntimeError,
                       'athena service has already been added, do nothing.')

            self.initialised = True

            from AthenaCommon.AppMgr import ServiceMgr

            self.mlog.info("initialising TrigConfigSvc using state %s",
                           self.states)
            if 'xml' in self.states:
                from TriggerJobOpts.TriggerFlags import TriggerFlags

                if TriggerFlags.doLVL2() or TriggerFlags.doEF(
                ) or TriggerFlags.doHLT() or TriggerFlags.configForStartup(
                ) == 'HLToffline':
                    self.mlog.info(
                        "setup HLTConfigSvc and add instance to ServiceMgr (xml file="
                        + self.hltXmlFile + ")")
                    hlt = HLTConfigSvc("HLTConfigSvc")
                    hlt.XMLMenuFile = self.hltXmlFile
                    hlt.doMergedHLT = TriggerFlags.doHLT()
                    ServiceMgr += hlt
                else:
                    self.mlog.info(
                        "Will not setup HLTConfigSvc, since TriggerFlags doLVL2(), doEF(), and doHLT() are all False"
                    )
                    self.states[self.states.index("xml")] = "xmll1"

                self.mlog.info(
                    "setup LVL1ConfigSvc and add instance to ServiceMgr (xml file="
                    + self.l1XmlFile + ")")
                l1 = LVL1ConfigSvc("LVL1ConfigSvc")
                l1.XMLMenuFile = self.l1XmlFile
                ServiceMgr += l1

                self.mlog.info(
                    "setup L1TopoConfigSvc and add instance to ServiceMgr (xml file="
                    + self.l1topoXmlFile + ")")
                l1topo = L1TopoConfigSvc()
                l1topo.XMLMenuFile = self.l1topoXmlFile
                ServiceMgr += l1topo

            if 'ds' in self.states:

                self.mlog.info(
                    "setup DSConfigSvc and add instance to ServiceMgr")
                ds = DSConfigSvc("DSConfigSvc")
                ServiceMgr += ds

            self.mlog.info(
                "setup TrigConfigSvc and add instance to ServiceMgr")
            trigSvc = TrigConfigSvc("TrigConfigSvc")
            trigSvc.PriorityList = self.states
            ServiceMgr += trigSvc
            from AthenaCommon.AppMgr import theApp
            theApp.CreateSvc += [ServiceMgr.TrigConfigSvc.getFullName()]
コード例 #12
0
    def __init__(self, name='TrigCaloDataAccessSvc'):
        super(TrigCaloDataAccessSvc, self).__init__(name)

        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
        from TriggerJobOpts.TriggerFlags import TriggerFlags
        from AthenaCommon.GlobalFlags import globalflags
        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
        from AthenaCommon.Logging import logging
        log = logging.getLogger(name)


        if ( globalflags.DatabaseInstance == "COMP200" and TriggerFlags.doCaloOffsetCorrection() ) :
            log.warning("Not possible to run BCID offset correction with COMP200")
        else:
            if TriggerFlags.doCaloOffsetCorrection():
                if globalflags.DataSource()=='data' and athenaCommonFlags.isOnline():
                    log.info('Enable HLT calo offset correction for data')
                    from IOVDbSvc.CondDB import conddb
                    conddb.addFolder("LAR_ONL","/LAR/ElecCalibFlat/OFC")
                    from LArRecUtils.LArRecUtilsConf import LArFlatConditionSvc
                    svcMgr += LArFlatConditionSvc()
                    svcMgr.LArFlatConditionSvc.OFCInput="/LAR/ElecCalibFlat/OFC"
                    svcMgr.ProxyProviderSvc.ProviderNames += [ "LArFlatConditionSvc" ]

                    from IOVDbSvc.CondDB import conddb
                    conddb.addFolder("LAR_ONL","/LAR/ElecCalibFlat/OFC",className = 'CondAttrListCollection')

                    from AthenaCommon.AlgSequence import AthSequencer
                    condSequence = AthSequencer("AthCondSeq")
                    from LArRecUtils.LArRecUtilsConf import LArFlatConditionsAlg_LArOFCFlat_ as LArOFCCondAlg
                    condSequence += LArOFCCondAlg (ReadKey="/LAR/ElecCalibFlat/OFC", WriteKey='LArOFC')
                    from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
                    LuminosityCondAlgOnlineDefault()
                    from CaloRec.CaloBCIDAvgAlgDefault import CaloBCIDAvgAlgDefault
                    CaloBCIDAvgAlgDefault()
                else:
                    log.info('Enable HLT calo offset correction for MC')
                    from CaloRec.CaloBCIDAvgAlgDefault import CaloBCIDAvgAlgDefault
                    CaloBCIDAvgAlgDefault()

                from AthenaCommon.AlgSequence import AlgSequence
                topSequence = AlgSequence()
                if not hasattr(topSequence,"CaloBCIDAvgAlg"):
                    log.info('Cannot use timer for CaloBCIDAvgAlg')
                else:
                    from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
                    monTool = GenericMonitoringTool('MonTool')
                    monTool.defineHistogram('TIME_exec', path='EXPERT', type='TH1F', title="CaloBCIDAvgAlg execution time; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=4000)
                    topSequence.CaloBCIDAvgAlg.MonTool = monTool
                    log.info('using timer for CaloBCIDAvgAlg')


            else:
                log.info('Disable HLT calo offset correction')

        return
コード例 #13
0
    def setupCOOLReading(self,TrigCoolDbConnection):
        log = logging.getLogger( "TriggerConfigGetter.py" )
        log.info( 'DSConfigSvc enabled, will setup IOVDbSvc to access configuration meta data')
        #usePresetConnection = (TrigCoolDbConnection != "")

        ## if we process MC from an XML file the dbConnection needs to
        ## be set to a local SQlite file

        # when reading from the COOL database (either form
        # ORACLE/SQlite) we need an algorithm that triggers the
        # copying
        #
        # In addition for MC the IOV has to be adjusted since in COOL the config data is written with IOV=infinity

        if TrigCoolDbConnection=='':
            log.info("COOL DBConnection: not set, will use default conditions database" )
            TrigCoolDbConnection = 'TRIGGER'
            addNewFolders = TriggerFlags.configForStartup()=="HLTonline" and self.readRDO
        else: # for sqlite COOL: temp (usually /tmp/hltMenu.xxx.db) or predefined (e.g. trigconf.db)
            log.info("COOL DBConnection: " + TrigCoolDbConnection )
            addNewFolders = ( ( TriggerFlags.configForStartup()=="HLToffline"
                                or TriggerFlags.configForStartup()=="HLTonline"
                                or globalflags.DataSource()!='data')
                              and self.readRDO )  # bytestream or MC RDO

        # add folders for reading
        from IOVDbSvc.CondDB import conddb
        folders = []
        if self.hltFolders:
            folders += [ "HLT/Menu", "HLT/HltConfigKeys" ]
        if self.l1Folders:
            folders += [ "LVL1/Lvl1ConfigKey", "LVL1/Menu", "LVL1/Prescales" ]
        if globalflags.DataSource() == 'data':
            if self.l1Folders:
                folders += [ "LVL1/BunchGroupKey", "LVL1/BunchGroupDescription", "LVL1/BunchGroupContent" ]
        if self.hasLBwiseHLTPrescalesAndL1ItemDef:
            if self.hltFolders:
                folders += [ "HLT/Prescales", "HLT/PrescaleKey" ]
            if self.l1Folders:
                folders += [ "LVL1/ItemDef" ]

        log.info("Adding folders to IOVDbSvc")

        if addNewFolders:
            # Need thresholds folders but only for Tier0 BS->ESD
            log.info("Also adding new folders to IOVDbSvc")
            if self.hltFolders:
                folders += [ "HLT/Groups" ]
            if self.l1Folders:
                folders += [ "LVL1/Thresholds" ]

        for f in folders:
            log.info("     /TRIGGER/%s", f)
            conddb.addFolderWithTag(TrigCoolDbConnection, "/TRIGGER/%s" % f, "HEAD")
コード例 #14
0
    def __init__(self, name='L1EmulationTest', *args, **kwargs):
        super(L1EmulationTest, self).__init__(name, *args, **kwargs)

        from TriggerJobOpts.TriggerFlags import TriggerFlags
        from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool

        self.RoIBResult = ""

        data = {}
        data['CTPEmulation'] = [
            'HLT_e3 HLT_g5 HLT_e7 HLT_2e3 HLT_mu6 HLT_2mu6 HLT_mu6idperf HLT_e15mu4',
            'HLT_e3 HLT_g5 HLT_mu6 HLT_2mu6 HLT_mu6idperf HLT_e15mu4',
            'HLT_e3 HLT_g5 HLT_e7 HLT_2e3 HLT_mu6 HLT_2mu6',
            'HLT_mu6 HLT_2mu6 HLT_mu6idperf HLT_e15mu4',
        ]  # just to see some change
        data['RoIEmulation'] = [
            '1.3,2.9,2704088841,EM3,EM7; 1.2,3.1,2972524297,EM3,EM7,EM10,EM15; -3.2,-2.0,3103727387,MU0,MU4,MU6,MU8',
            '1.2,1.9,2733969453,MU0,MU4,MU6,MU8,MU10;2.2,1.0,2733969453,MU0,MU4,MU6',
            '-3.2,3.0,2704088841,MU0,MU4,MU6,MU8;3.0,1.6,2972524297,MU0,MU4',
            '1.3,1.9,3103727387,MU0,MU10;1.2,2.6,2733969453,MU6;-1.1,2.6,2972524297,MU6; -1.2,2.6,2704088842,MU20'
        ]

        writeEmulationFiles(data)
        ctpUnpacker = CTPUnpackingEmulationTool(
            OutputLevel=self.getDefaultProperty("OutputLevel"),
            ForceEnableAllChains=True)
        self.ctpUnpacker = ctpUnpacker
        self += ctpUnpacker

        from L1Decoder.L1DecoderConfig import mapThresholdToL1RoICollection

        # EM unpacker
        if TriggerFlags.doID() or TriggerFlags.doCalo():
            emUnpacker = RoIsUnpackingEmulationTool(
                "EMRoIsUnpackingTool",
                Decisions="EMRoIDecisions",
                OutputTrigRoIs=mapThresholdToL1RoICollection("EM"),
                OutputLevel=self.getDefaultProperty("OutputLevel"))
            self.roiUnpackers += [emUnpacker]
            print(emUnpacker)

        # MU unpacker
        if TriggerFlags.doMuon():
            muUnpacker = RoIsUnpackingEmulationTool(
                "MURoIsUnpackingTool",
                Decisions="MURoIDecisions",
                OutputTrigRoIs=mapThresholdToL1RoICollection("MU"),
                OutputLevel=self.getDefaultProperty("OutputLevel"))
            self.roiUnpackers += [muUnpacker]

        self.L1DecoderSummaryKey = "L1DecoderSummary"
コード例 #15
0
    def configure(self):

        log = logging.getLogger("TrigDecisionGetterRun2")

        from AthenaCommon.AlgSequence import AlgSequence
        topSequence = AlgSequence()

        #if hasOnlyLVL1:
        #from RecExConfig.ObjKeyStore import objKeyStore
        #objKeyStore.addStreamESD('TrigDec::TrigDecision','TrigDecision')
        #objKeyStore.addStreamAOD('TrigDec::TrigDecision','TrigDecision')

        from RecExConfig.RecFlags import rec
        if ( rec.doWriteESD() or rec.doWriteAOD() or rec.doESD() or rec.doAOD() ) and \
               ( not ( rec.readAOD() or rec.readESD() or rec.doWriteBS()) ):
            log.info("Will write TrigDecision object to storegate")

            from TrigDecisionMaker.TrigDecisionMakerConfig import WriteTrigDecision
            trigDecWriter = WriteTrigDecision()  # noqa: F841

            #           WritexAODTrigDecision() is called within WriteTrigDecision()

            # inform TD maker that some parts may be missing
            if TriggerFlags.dataTakingConditions() == 'Lvl1Only':
                topSequence.TrigDecMaker.doL2 = False
                topSequence.TrigDecMaker.doEF = False
                topSequence.TrigDecMaker.doHLT = False
                topSequence.TrigNavigationCnvAlg.doL2 = False
                topSequence.TrigNavigationCnvAlg.doEF = False
                topSequence.TrigNavigationCnvAlg.doHLT = False
            elif TriggerFlags.dataTakingConditions() == 'HltOnly':
                from AthenaCommon.AlgSequence import AlgSequence
                topSequence.TrigDecMaker.doL1 = False
            # Decide based on the doMergedHLTResult to assume a merged, or a
            # split HLT:
            if not TriggerFlags.doMergedHLTResult():
                topSequence.TrigDecMaker.doHLT = False
                topSequence.TrigNavigationCnvAlg.doL2 = False
                topSequence.TrigNavigationCnvAlg.doHLT = False
            else:
                topSequence.TrigDecMaker.doL2 = False
                topSequence.TrigDecMaker.doEF = False
                topSequence.TrigNavigationCnvAlg.doL2 = False
                topSequence.TrigNavigationCnvAlg.doEF = False
                pass

        else:
            log.info("Will not write TrigDecision object to storegate")

        return True
コード例 #16
0
def getOverallL1item(chainName):
    """
    Extracts the L1 seed from the chain name, checks for issue in naming, if found, fails

    In simple case the L1 items is just the last part of the name, after the _L1...
    There are though more complicated names like ...._L1...._L1..._L1... in such cases the L1 seed item is the last one
    """
    assert '_L1' in chainName, 'ERROR IN CHAIN {}, missing L1 seed at the end i.e. _L1...'.format(
        chainName)

    from TriggerMenuMT.LVL1MenuConfig.LVL1Menu.L1Seeds import getSpecificL1Seeds
    from TrigConfIO.L1TriggerConfigAccess import L1MenuAccess
    from TrigConfigSvc.TrigConfigSvcCfg import getL1MenuFileName

    # this assumes that the last string of a chain name is the overall L1 item
    cNameParts = chainName.split("_L1")
    l1seed = 'L1_' + cNameParts[-1]
    # For reference, remapping of L1seeds lived originally in LVL1MenuConfig/LVL1Menu/L1Seeds.py
    # L1 collections can be read out from there in case they are needed again
    if l1seed == 'L1_All':
        return ''
    if l1seed == 'L1_test':  #Multiseeded chains are build like this
        return 'L1_EM24VHI,L1_MU20'
    if l1seed == 'L1_Bkg' or l1seed == 'L1_Standby' or l1seed == 'L1_Calo' or l1seed == 'L1_Calo_EMPTY':
        # For these item seed specifications we need to derive the precise list of item names from the L1Menu.
        # During the transition period to the new menu format it is important to pick the correct kind based
        # on the temporary TriggerFlag readLVL1FromJSON.
        from TriggerJobOpts.TriggerFlags import TriggerFlags
        if TriggerFlags.readLVL1FromJSON():
            lvl1name = getL1MenuFileName()
            lvl1access = L1MenuAccess(lvl1name)
            itemsDict = lvl1access.items(
                includeKeys=['name', 'ctpid', 'triggerType'])
        else:
            from TriggerMenuMT.LVL1MenuConfig.LVL1.XMLReader import L1MenuXMLReader
            fileName = TriggerFlags.inputLVL1configFile()
            l1menu = L1MenuXMLReader(fileName)
            l1items = l1menu.getL1Items()
            itemsDict = {}
            for item in l1items:
                itemsDict[item['name']] = {
                    'name': item['name'],
                    'ctpid': item['ctpid'],
                    'triggerType': item['trigger_type'],
                }
        l1seedlist = getSpecificL1Seeds(l1seed, itemsDict)
        return l1seedlist

    return l1seed
コード例 #17
0
    def __init__(self, name="HIL2VtxMultHypoMonitoring"):
        super(HIL2VtxMultHypoMonitoring, self).__init__(name)
        self.defineTarget(["Online", "Validation", "Cosmic"])

        self.Histograms += [
            defineHistogram('numVertices',
                            type='TH1I',
                            title="Vertices;evts",
                            xbins=10,
                            xmin=0.0,
                            xmax=10.)
        ]

        menuName = TriggerFlags.triggerMenuSetup()
        range = 5000 if '_HI_' in menuName else 2500

        self.Histograms += [
            defineHistogram('vertexWeight',
                            type='TH1D',
                            title="Vertex Weight;evts",
                            xbins=range,
                            xmin=0,
                            xmax=range)
        ]
        self.Histograms += [
            defineHistogram('vertexWeightMax',
                            type='TH1D',
                            title=" Max Vertex Weight;evts",
                            xbins=range,
                            xmin=0,
                            xmax=range)
        ]
コード例 #18
0
def addExpressStream(triggerPythonConfig):
    Names = {}
    menu_name = TriggerFlags.triggerMenuSetup()
    if menu_name.startswith('L1_pp_v4') or menu_name.startswith(
            'Physics_pp_v4') or menu_name.startswith('MC_pp_v4'):
        Names = ExpressNamesPPV4
    elif menu_name.startswith('L1_pp_v5') or menu_name.startswith(
            'Physics_pp_v5') or menu_name.startswith('MC_pp_v5'):
        Names = ExpressNamesPPV5
    elif menu_name.startswith('L1_pp_v6') or menu_name.startswith(
            'Physics_pp_v6') or menu_name.startswith('MC_pp_v6'):
        Names = ExpressNamesPPV6
    elif menu_name.startswith('L1_pp_v7') or menu_name.startswith(
            'Physics_pp_v7') or menu_name.startswith('MC_pp_v7'):
        Names = ExpressNamesPPV7

    for chainName, chainPrescale in Names.iteritems():
        if chainName not in triggerPythonConfig.allChains.keys():
            log.warning('Signature %s not registered to TriggerPythonConfig' %
                        chainName)
            continue

        if len(triggerPythonConfig.allChains[chainName]) == 2:
            efchain = triggerPythonConfig.allChains[chainName][1]
            efchain.addStreamTag('express',
                                 type='express',
                                 obeyLB='yes',
                                 prescale=chainPrescale)
        elif len(triggerPythonConfig.allChains[chainName]
                 ) == 1:  #this is needed for hi jets
            efchain = triggerPythonConfig.allChains[chainName][0]
            efchain.addStreamTag('express',
                                 type='express',
                                 obeyLB='yes',
                                 prescale=chainPrescale)
コード例 #19
0
def checkTriggerGroupAssignment(triggerPythonConfig):
    """ Checks menu consistency

    Checks trigger-groups assignment in Physics_ and MC_ menus.
    Excludes those chains which either have no group assigned or have a wrong group attached in Physics_
    which allows only primary, supporting and calibration triggers. 
    """
    menu_name = TriggerFlags.triggerMenuSetup()
    log.info( "Menu: " + menu_name)
    GroupItems = []
    CheckGroups=False

    if menu_name.startswith('Physics_lumi'):
        CheckGroups=True
        GroupItems = ['Primary', 'Supporting', 'Calibration', 'Monitoring']
    elif menu_name.startswith('MC_lumi'):
        CheckGroups=True
        GroupItems = ['Primary', 'Supporting', 'Calibration', 'Monitoring', 'Backup', 'Commissioning', 'Test']

    for chain in triggerPythonConfig.theL2HLTChains + triggerPythonConfig.theEFHLTChains:
        if len(chain.groups) == 0:
            log.error( "IN CHAIN: GROUP undefined for chain: " + str(chain.chain_name) )
        else:
            GroupAssigned=False
            
            for group in GroupItems:
                if group in chain.groups:
                    GroupAssigned=True
            if not GroupAssigned and CheckGroups:
                log.warning( "IN CHAIN: GROUP (primary, supporting, ... etc) undefined for chain: " + str(chain.chain_name) + ".")
コード例 #20
0
    def __init__(self, outputFile = None , inputFile = None , menuName = None ):
        """
        inputFile: if set the topo menu will be read from this xml file (not yet implemented)
        outputFile: if no input file is specified the topo menu will be generated and written to outputFile
        menuName: ignored now
        """
        from TriggerJobOpts.TriggerFlags import TriggerFlags

        self.menuName = TriggerConfigL1Topo.getMenuBaseName(TriggerFlags.triggerMenuSetup())

        self.inputFile     = inputFile
        self.outputFile    = outputFile
        
        # all registered algos
        self.registeredAlgos = {}

        self.runningid=0
        
        # menu
        self.menu = L1TopoMenu(self.menuName)
        
        if self.inputFile is not None:
            """Read menu from XML"""
            log.error("Menu input is not implemented!!")
        else:
            """Build menu from menu name"""

            # defines the menu (algo only for now)
            self.defineMenu(self.menuName)

            # registers all items ever defined
            self.registerMenu()
コード例 #21
0
def getInputTEfromL1Item(l1item):

    L1Map = {
        'L1_TAU8_EMPTY': ['HA8'],
        'L1_TAU8_FIRSTEMPTY': ['HA8'],
        'L1_TAU8_UNPAIRED_ISO': ['HA8'],
        'L1_TAU8_UNPAIRED_NONISO': ['HA8'],
        'L1_TAU12_EMPTY': ['HA12'],
        'L1_TAU12_FIRSTEMPTY': ['HA12'],
        'L1_TAU12_UNPAIRED_ISO': ['HA12'],
        'L1_RD0_FIRSTEMPTY': [''],
        'L1_TAU30': ['HA30'],
        'L1_TAU30_EMPTY': ['HA30'],
        'L1_TAU30_UNPAIRED_ISO': ['HA30'],
        'L1_TAU40': ['HA40'],
        'L1_TAU60': ['HA60'],
        'L1_TAU100': ['HA100'],
    }

    if TriggerFlags.triggerMenuSetup() == 'LS1_v1':
        L1Map['L1_CALREQ2'] = ['NIM30']
    else:
        L1Map['L1_CALREQ2'] = ['CAL2']

    if l1item in L1Map:
        TE = L1Map[l1item]
        log.debug('Mapped L1 input TE from %s to %s.', l1item, TE)
        return TE
    else:
        TE = l1item.replace("L1_", "").split("_")[0]
        TE = TE[1:] if TE[0].isdigit() else TE
        return TE
コード例 #22
0
def resetSigs():
    TriggerFlags.Slices_all_setOff()
    TriggerFlags.TauSlice.setAll()
    TriggerFlags.TauSlice.signatures = [
        'tauNoCut_FTK', 'tau20_medium_FTK', 'tauNoCut', 'tau20_medium'
    ]
    #    TriggerFlags.TauSlice.signatures = ['tauNoCut_FTK', 'tau20_medium_FTK']
    TriggerFlags.MuonSlice.setAll()
    TriggerFlags.MuonSlice.signatures = [
        'mu6_FTK', 'mu4_NoCut', 'mu24_tight_FTK', 'mu4_L2Star_NoCut'
    ]
    #    TriggerFlags.EgammaSlice.setAll();
    #    TriggerFlags.EgammaSlice.signatures = ['e24vh_medium1_FTK','2e12Tvh_loose1_FTK','e24vh_medium1','2e12Tvh_loose1']

    TriggerFlags.BjetSlice.setAll()
    TriggerFlags.BjetSlice.signatures = [
        'b55_NoCut_j55_a4tchad_FTK', 'b55_NoCut_j55_a4tchad',
        'b55_NoCut_j55_a4tchad_FTK_Refit'
    ]

    TriggerFlags.JetSlice.setAll()
    TriggerFlags.JetSlice.signatures = ['3j25_a4tchad']

    TriggerFlags.BeamSpotSlice.setAll()
    TriggerFlags.BeamSpotSlice.signatures = [
        'beamspot_vertex_FSTracks_L2Star_F'
    ]

    TriggerFlags.METSlice.setAll()
    TriggerFlags.METSlice.signatures = [
        "xe_NoCut_tclcw_allL1", "xe_NoCut_FEB_allL1", "xe_NoCut_allL1"
    ]
コード例 #23
0
 def __init__(self):
     from tempfile import mktemp
     self.dbfilename = mktemp('.db', 'hltMenu.')
     from IOVDbSvc.CondDB import conddb
     self.dbname = conddb.GetInstance(
     )  # COMP200 or CONDBR2 (consistent with what is used for reading it back)
     self.dbConnection = "<dbConnection>sqlite://;schema=%s;dbname=%s</dbConnection>" % (
         self.dbfilename, self.dbname)
     self.isWritingNeeded = False
     from RecExConfig.RecFlags import jobproperties as jp
     from TriggerJobOpts.TriggerFlags import jobproperties as jp
     from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
     if jp.Rec.Trigger.readLVL1configFromXML():
         self.lvl1menu = jp.Rec.Trigger.inputLVL1configFile()
     else:
         self.lvl1menu = jp.Rec.Trigger.outputLVL1configFile()
     if jp.Rec.Trigger.readHLTconfigFromXML():
         self.hltmenu = jp.Rec.Trigger.inputHLTconfigFile()
     else:
         self.hltmenu = jp.Rec.Trigger.outputHLTconfigFile()
     self.menusource = 'xml'  # either db or xml
     self.trigdb = ''
     self.smk = 0
     self.l1psk = 0
     self.hltpsk = 0
     self.bgsk = 1
     self.useFrontier = tf.triggerUseFrontier()
コード例 #24
0
def generateL1Menu(menu, doFTK="False", useTopoMenu="MATCH"):

    from AthenaCommon.Logging import logging
    log = logging.getLogger("TriggerConfigLVL1")
    log.setLevel(logging.INFO)
    logging.getLogger("TriggerMenu.l1.Lvl1Menu").setLevel(logging.INFO)

    TF.doFTK = doFTK
    log.info("doFTK: %s " % TF.doFTK)

    # what menu to build
    TF.triggerMenuSetup = menu

    # TPC for L1
    tpcl1 = TriggerConfigLVL1(outputFile=TF.outputLVL1configFile())

    # build the menu structure
    tpcl1.generateMenu()

    # write xml file
    outfilename = tpcl1.writeXML()

    # consistency checker
    checkResult = os.system(
        "get_files -xmls -symlink LVL1config.dtd > /dev/null")
    checkResult = os.system("xmllint --noout --dtdvalid LVL1config.dtd %s" %
                            outfilename)
    if checkResult == 0:
        log.info("XML file %s is conform with LVL1config.dtd" % outfilename)
    else:
        log.error(
            "the XML does not follow the document type definition LVL1config.dtd"
        )

    return tpcl1.menu
コード例 #25
0
def checkPoolFileForRunLevel(poolfilename):
    folderName = {
        "L1M": "_TRIGGER_LVL1_Menu",
        "HLTM": "_TRIGGER_HLT_Menu",
        "L1K": "_TRIGGER_LVL1_Lvl1ConfigKey",
        "HLTK": "_TRIGGER_HLT_HltConfigKeys",
        "L1PS": "_TRIGGER_LVL1_Prescales"
    }
    MetaDataTree.Add(poolfilename + '/MetaData')
    mdt = AthenaROOTAccess.transientTree.makeTree(
        MetaDataTree,
        persTreeName='MetaData',
        dhTreeName='MetaDataHdrDataHeader')
    l1keys = []
    hltkeys = []

    if hasattr(mdt, folderName["L1K"]):
        br = mdt.GetBranch(folderName["L1K"])
        for i in range(mdt.GetEntries()):
            br.GetEntry(i)
            metaData = getattr(mdt, br.GetName())
            plc = metaData.payloadContainer()
            for payload in plc.iter():
                for i in range(payload.size()):
                    chanNum = int(payload.chanNum(i))
                    l1keys += [
                        payload.attributeList(chanNum)
                        ["Lvl1PrescaleConfigurationKey"].data("unsigned int")()
                    ]

    if hasattr(mdt, folderName["HLTK"]):
        br = mdt.GetBranch(folderName["HLTK"])
        for i in range(mdt.GetEntries()):
            br.GetEntry(i)
            metaData = getattr(mdt, br.GetName())
            plc = metaData.payloadContainer()
            for payload in plc.iter():
                for i in range(payload.size()):
                    chanNum = int(payload.chanNum(i))
                    hltkeys += [
                        payload.attributeList(chanNum)
                        ["HltPrescaleConfigurationKey"].data("unsigned int")()
                    ]

    mlog.info("File contained these LVL1 prescale keys: %r", l1keys)
    mlog.info("File contained these HLT prescale keys: %r", hltkeys)

    hasL1 = len(l1keys) > 0 and 0 not in l1keys
    hasHLT = len(hltkeys) > 0 and 0 not in hltkeys

    from TriggerJobOpts.TriggerFlags import TriggerFlags
    if hasL1 or hasHLT:
        if hasL1 and hasHLT:
            TriggerFlags.dataTakingConditions = 'FullTrigger'
        elif hasL1:
            TriggerFlags.dataTakingConditions = 'Lvl1Only'
        else:
            TriggerFlags.dataTakingConditions = 'HltOnly'
        mlog.info("Set TriggerFlags.dataTakingConditions to '%s'",
                  TriggerFlags.dataTakingConditions())
コード例 #26
0
def setupMenu():
    from TriggerJobOpts.TriggerFlags import TriggerFlags

    TriggerFlags.Slices_all_setOff()

    TriggerFlags.TestSlice.signatures = []

    TriggerFlags.MuonSlice.signatures = [
        ChainProp(name='HLT_mu4_cosmic_L1MU4_EMPTY',
                  l1SeedThresholds=['MU4'],
                  stream=['CosmicMuons'],
                  groups=['RATE:Cosmic_Muon', 'BW:Muon']),
        ChainProp(name='HLT_mu4_msonly_cosmic_L1MU4_EMPTY',
                  l1SeedThresholds=['MU4'],
                  stream=['CosmicMuons'],
                  groups=['RATE:Cosmic_Muon', 'BW:Muon']),
    ]

    TriggerFlags.EgammaSlice.signatures = [
        ChainProp(name='HLT_g3_etcut_LArPEB_L1EM3',
                  stream=['LArCells'],
                  groups=['RATE:SinglePhoton', 'BW:Egamma'])
    ]

    TriggerFlags.METSlice.signatures = []
    TriggerFlags.JetSlice.signatures = []
    TriggerFlags.BjetSlice.signatures = []
    TriggerFlags.TauSlice.signatures = []
    TriggerFlags.BphysicsSlice.signatures = []
    TriggerFlags.CombinedSlice.signatures = []
    TriggerFlags.HeavyIonSlice.signatures = []
    TriggerFlags.BeamspotSlice.signatures = []
    TriggerFlags.MinBiasSlice.signatures = []
    TriggerFlags.CalibSlice.signatures = []
    TriggerFlags.CosmicSlice.signatures = []
    TriggerFlags.StreamingSlice.signatures = [
        ChainProp(name='HLT_noalg_idcosmic_L1TRT_EMPTY',
                  l1SeedThresholds=['FSNOSEED'],
                  stream=['IDCosmic', 'express'],
                  groups=['RATE:SeededStreamers', 'BW:Other']),
        ChainProp(name='HLT_noalg_idcosmic_L1TRT_FILLED',
                  l1SeedThresholds=['FSNOSEED'],
                  stream=['IDCosmic'],
                  groups=['RATE:SeededStreamers', 'BW:Other']),
        ChainProp(name='HLT_noalg_cosmicmuons_L1MU4_EMPTY',
                  stream=['CosmicMuons', 'express'],
                  groups=['RATE:Cosmic_Muon', 'BW:Muon']),
        ChainProp(name='HLT_noalg_cosmiccalo_L1MU11_EMPTY',
                  stream=['CosmicMuons', 'express'],
                  groups=['RATE:Cosmic_Muon', 'BW:Muon']),
    ]
    TriggerFlags.MonitorSlice.signatures = []

    # Random Seeded EB chains which select at the HLT based on L1 TBP bits
    TriggerFlags.EnhancedBiasSlice.signatures = []

    # Add all standard monitoring chains from addP1Signatures function
    addP1Signatures()

    addSliceChainsToPrescales(TriggerFlags, Prescales.HLTPrescales_cosmics)
コード例 #27
0
def checkTriggerGroupAssignment(triggerPythonConfig):
    """ Checks menu consistency

    Checks trigger-groups assignment in Physics_ and MC_ menus.
    Excludes those chains which either have no group assigned or have a wrong group attached in Physics_
    which allows only primary, supporting and calibration triggers. 
    """
    menu_name = TriggerFlags.triggerMenuSetup()
    log.info( "Menu: " + menu_name)
    GroupItems = []
    CheckGroups=False

    if menu_name.startswith('Physics_lumi'):
        CheckGroups=True
        GroupItems = ['Primary', 'Supporting', 'Calibration', 'Monitoring']
    elif menu_name.startswith('MC_lumi'):
        CheckGroups=True
        GroupItems = ['Primary', 'Supporting', 'Calibration', 'Monitoring', 'Backup', 'Commissioning', 'Test']

    for chain in triggerPythonConfig.theL2HLTChains + triggerPythonConfig.theEFHLTChains:
        if len(chain.groups) == 0:
            log.error( "IN CHAIN: GROUP undefined for chain: " + str(chain.chain_name) )
        else:
            GroupAssigned=False
            
            for group in GroupItems:
                if group in chain.groups:
                    GroupAssigned=True
            if not GroupAssigned and CheckGroups:
                log.warning( "IN CHAIN: GROUP (primary, supporting, ... etc) undefined for chain: " + str(chain.chain_name) + ".")
コード例 #28
0
def checkStreamConsistency(triggerPythonConfig,streamConfig):
    """ Checks streamer consistency
    Checks that all chains are assigned to existing streams
    """
    menu_name = TriggerFlags.triggerMenuSetup()
    log.info( "Menu: " + menu_name)
    CheckGroups=False

    allStreams=['UPC',
                'TRTMonitoring',
                'WarmStart',      
                'ZeroBias',       
                'CosmicCalo',     
                'ZeroBiasOverlay',
                'CosmicMuons',
                'CosmicCalo',
                'IDCosmic',
                'IDMonitoring',
                'IDTracks',
                'Muon_Calibration',
                'Standby',   
                'Background',
                'MinBias',
                'MinBiasOverlay',
                'ALFA',
                'Bphysics',
                'physics',
                'express',
                'Tile',
                'L1Muon',
                'L1MinBias',
                'EnhancedBias',
                'LArCells',
                'LArCellsEmpty',
                'DISCARD',
                'EFCostMonitoring',
                'HLTPassthrough',
                'beamspot',
                'PixelBeam',
                'PixelNoise',
                'VdM',
                'L2CostMonitoring',
                'SCTNoise',
                'ALFACalib',
                'L1Calo',     
                'L1CaloCalib',     
                ]

    allStreams.extend(streamConfig)

    for chain in triggerPythonConfig.theL2HLTChains + triggerPythonConfig.theEFHLTChains:
        if len(chain.stream_tag) == 0:
            logger().error( "IN CHAIN: STREAMTAG undefined for chain: " + str(chain.chain_name) )
        else:
            for stream in chain.stream_tag:
                if stream[0] in allStreams:
                    continue
                else:
                    log.error(' Chain: ' + chain.chain_name + ' has the wrong streamer ' + stream[0])
コード例 #29
0
def compareL1Menus(menu="LVL1config_Physics_pp_v7.xml"):

    from AthenaCommon.Logging import logging
    log = logging.getLogger("TriggerConfigLVL1")
    log.setLevel(logging.INFO)

    import os
    for path in os.environ['XMLPATH'].split(':'):
        if not 'TriggerMenuXML' in os.listdir(path):
            continue
        if menu in os.listdir("%s/TriggerMenuXML/" % path):
            fullname = "%s/TriggerMenuXML/%s" % (path, menu)
        break  # we only want to look into the first TriggerMenuXML package
    print 'comparing: ', fullname, TF.outputLVL1configFile()
    local_menu = TF.outputLVL1configFile()
    are_files_identical = filecmp.cmp(fullname, local_menu)
    return are_files_identical
コード例 #30
0
def applyPrescales(triggerPythonConfig, HLTPrescales):
    no_prescale = False
    if 'no_prescale' in TriggerFlags.triggerMenuSetup() or \
       TriggerFlags.triggerMenuSetup() == 'default':
        no_prescale = True

    #if L1Prescales==None and TriggerFlags.L1PrescaleSet()!='':
    #    log.warning('Cannot find L1 prescale set %s, not explicitly setting them' % \
    #                TriggerFlags.L1PrescaleSet())
    #    L1Prescales = {}
    if HLTPrescales == None and TriggerFlags.HLTPrescaleSet() != '':
        log.warning('Cannot find HLT prescale set %s, not explicitly setting them' % \
                    TriggerFlags.HLTPrescaleSet())
        HLTPrescales = {}

    if TriggerFlags.doHLT():
        applyHLTPrescale(triggerPythonConfig, HLTPrescales)

    if TriggerFlags.L1PrescaleSet() == 'None':
        for item in triggerPythonConfig.allItems.values():
            item.prescale = '1'
    if TriggerFlags.HLTPrescaleSet() == 'None':
        for sig in triggerPythonConfig.allChains.values():
            for chain in sig:
                chain.prescale = '1'
                chain.pass_through = '0'
                tmp_stag = chain.stream_tag
                chain.stream_tag = []
                for s in tmp_stag:
                    chain.addStreamTag(s[0], s[1], s[2], 1)

    if no_prescale:
        resetAllPrescales(triggerPythonConfig)
コード例 #31
0
def setupCostJob(config='OPI ROB NOPS'):

    log = logging.getLogger('setupCostJob')

    if config.count('OPI'):
        log.info('Configure TrigSteer algorithm(s)')

        from AthenaCommon.AlgSequence import AlgSequence
        topSeq = AlgSequence()

        from TriggerJobOpts.TriggerFlags import TriggerFlags
        if TriggerFlags.doHLT():
            configSteeringOPI(topSeq, 'TrigSteer_HLT', config, log)
        else:
            if TriggerFlags.doEF():
                configSteeringOPI(topSeq, 'TrigSteer_EF', config, log)
            if TriggerFlags.doLVL2():
                configSteeringOPI(topSeq, 'TrigSteer_L2', config, log)

    if config.count('ROB'):
        log.info(
            'Will try to configure online monitoring for ROBDataProviderSvc...'
        )
        from AthenaCommon.AppMgr import ServiceMgr as svcMgr

        try:
            log.info('ROBDataProviderSvc type: ' +
                     svcMgr.ROBDataProviderSvc.getType())

            if svcMgr.ROBDataProviderSvc.getType() == 'Lvl2ROBDataProviderSvc':
                log.info('Job already uses online version ROBDataProvider')
            else:
                from AthenaCommon.Include import include
                include('TrigDataAccessMonitoring/MonROBDataProviderSvc.py')
                log.info('Setup "online" monitoring for ROBDataProvider')
        except:
            log.warning('Failed to setup "online" version of ROBDataProvider')

        try:
            from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ROBDataProviderSvc
            svcMgr.ROBDataProviderSvc.doDetailedROBMonitoring = True
            log.info('Set ROBDataProviderSvc.doDetailedROBMonitoring=True')
        except:
            log.warning(
                'Failed to set ROBDataProviderSvc.doDetailedROBMonitoring')
コード例 #32
0
def findFreeCTPIDs(menu):
    from pickle import load
    f = open("L1Items.pickle", "r")
    [menus, allItems, allThrs] = load(f)

    TF.triggerMenuSetup = menu
    tpcl1 = TriggerConfigLVL1(outputFile=TF.outputLVL1configFile())

    print(set(Lvl1Flags.CtpIdMap().keys()) - allItems)
コード例 #33
0
def getL1BackgroundSeed(menul1items):
    l1background_seeds = 'L1_BCM_AC_CA_BGRP0,L1_BCM_Wide_EMPTY,L1_BCM_Wide_UNPAIRED_ISO,L1_BCM_Wide_UNPAIRED_NONISO,L1_J30.31ETA49_UNPAIRED_ISO,L1_J12_UNPAIRED_ISO,L1_J12_UNPAIRED_NONISO,L1_J12_ABORTGAPNOTCALIB,L1_BCM_AC_UNPAIRED_ISO,L1_BCM_CA_UNPAIRED_ISO,L1_BCM_AC_UNPAIRED_NONISO,L1_BCM_CA_UNPAIRED_NONISO,L1_J30.31ETA49_UNPAIRED_NONISO,L1_BCM_AC_ABORTGAPNOTCALIB,L1_BCM_CA_ABORTGAPNOTCALIB,L1_BCM_Wide_ABORTGAPNOTCALIB,L1_BCM_AC_CALIB,L1_BCM_CA_CALIB,L1_BCM_Wide_CALIB,L1_J50_UNPAIRED_ISO,L1_J50_UNPAIRED_NONISO,L1_J50_ABORTGAPNOTCALIB'

    if 'pp_v7' in TriggerFlags.triggerMenuSetup():
        l1background_seeds += ',L1_BCM_AC_UNPAIREDB1,L1_BCM_CA_UNPAIREDB2,L1_J12_UNPAIREDB1,L1_J12_UNPAIREDB2'

    if TriggerFlags.triggerMenuSetup() == 'LS1_v1':
        l1background_seeds = 'L1_BCM_AC_CA_BGRP0,L1_BCM_AC_CA_UNPAIRED_ISO,L1_BCM_Wide_EMPTY,L1_BCM_Wide_UNPAIRED_ISO,L1_BCM_Wide_UNPAIRED_NONISO,L1_EM3_UNPAIRED_ISO,L1_FJ30_UNPAIRED_ISO,L1_J10_UNPAIRED_ISO,L1_J10_UNPAIRED_NONISO,L1_LUCID_A_C_EMPTY,L1_LUCID_A_C_UNPAIRED_ISO,L1_LUCID_A_C_UNPAIRED_NONISO,L1_LUCID_EMPTY,L1_LUCID_UNPAIRED_ISO,L1_MU4_UNPAIRED_ISO,L1_LUCID_COMM_UNPAIRED_ISO,L1_LUCID_COMM_EMPTY'

    # check if all the l1 background seeds given are in the current L1 menu
    l1bgditems = l1background_seeds.split(',')
    for item in l1bgditems:
        if item not in menul1items:
            log.error(
                'L1 item %s from background seeds is not in current L1 menu' %
                item)

    return l1background_seeds
コード例 #34
0
    def defineMenu(menuName = None ):
        """
        Defines the list if item and threshold names that will be in the menu

        Calls defineMenu() of the correct module 'Menu_<menuname>.py'

        Menu.defineMenu() defines the menu via Lvl1Flags
        """

        if not menuName:
            menuName = TriggerFlags.triggerMenuSetup()

        from TriggerJobOpts.TriggerFlags import TriggerFlags
        menumodule = __import__('l1menu.Menu_%s' % menuName.replace("_tight_mc_prescale","").replace("_loose_mc_prescale","").replace("_no_prescale",""), globals(), locals(), ['defineMenu'], -1)
        menumodule.defineMenu()
        log = logging.getLogger('TriggerConfigLVL1.defineMenu')
        log.info("menu %s contains %i items and %i thresholds" % ( menuName, len(Lvl1Flags.items()), len(Lvl1Flags.thresholds()) ) )
コード例 #35
0
def BunchCrossingConfProvider( type = "" ):

    # Get ourselves a logger:
    from AthenaCommon.Logging import logging
    __logger = logging.getLogger( "BunchCrossingConfProvider" )

    # If the user requested some instance directly:
    if type != "":
        if type == "TrigConf":
            __logger.info( "Forcing the usage of TrigConfBunchCrossingTool" )
            from TrigBunchCrossingTool.BunchCrossingTool import TrigConfBunchCrossingTool
            return TrigConfBunchCrossingTool()
        elif type == "LHC":
            __logger.info( "Forcing the usage of LHCBunchCrossingTool" )
            from TrigBunchCrossingTool.BunchCrossingTool import LHCBunchCrossingTool
            return LHCBunchCrossingTool()
        elif type == "MC":
            from TrigBunchCrossingTool.BunchCrossingTool import MCBunchCrossingTool
            __logger.info( "Forcing the usage of MCBunchCrossingTool" )
            return MCBunchCrossingTool()
        else:
            __logger.warning( "Type = " + type + " not recognized" )
            __logger.warning( "Will select tool type based on global flags" )

    # Decide which tool to use based on the global flags:
    from AthenaCommon.GlobalFlags import globalflags
    if globalflags.isOverlay():
        __logger.info( "Selecting LHCBunchCrossingTool for overlay job" )
        from TrigBunchCrossingTool.BunchCrossingTool import LHCBunchCrossingTool
        return LHCBunchCrossingTool()
    if globalflags.DataSource() == "data":
        from RecExConfig.RecFlags import rec
        from RecExConfig.RecAlgsFlags import recAlgs
        from TriggerJobOpts.TriggerFlags import TriggerFlags
        if rec.doTrigger() or TriggerFlags.doTriggerConfigOnly() or recAlgs.doTrigger():
            from TrigBunchCrossingTool.BunchCrossingTool import TrigConfBunchCrossingTool
            __logger.info( "Selecting TrigConfBunchCrossingTool for this job" )
            return TrigConfBunchCrossingTool()
        else:
            __logger.info( "Trigger turned off, selecting LHCBunchCrossingTool for this job" )
            from TrigBunchCrossingTool.BunchCrossingTool import LHCBunchCrossingTool
            return LHCBunchCrossingTool()
    else:
        __logger.info( "Selecting MCBunchCrossingTool for this job" )
        from TrigBunchCrossingTool.BunchCrossingTool import MCBunchCrossingTool
        return MCBunchCrossingTool()
コード例 #36
0
def generateL1TopoMenu(menu):

    from AthenaCommon.Logging import logging
    log = logging.getLogger("TriggerConfigL1Topo")
    log.setLevel(logging.INFO)


    # what menu to build
    TF.triggerMenuSetup = menu

    # TPC for L1Topo
    tpcl1 = TriggerConfigL1Topo( outputFile = TF.outputL1TopoConfigFile(), menuName = TF.triggerMenuSetup() )

    # build the menu structure
    tpcl1.generateMenu()

    # write xml file
    tpcl1.writeXML()
コード例 #37
0
    def __init__(self, outputFile = None , inputFile = None , menuName = None , topoMenu = "MATCH" ):
        """
        topoMenu: MATCH means that the L1Topo menu matches the L1 menu
        """
        TriggerConfigLVL1.current = self

        from TriggerJobOpts.TriggerFlags import TriggerFlags
        if menuName:
            TriggerFlags.triggerMenuSetup = menuName
        self.menuName = TriggerFlags.triggerMenuSetup()

        self.inputFile     = inputFile
        self.outputFile    = outputFile
        self.l1menuFromXML = None # flag if l1menu is read from XML file
        self.menuName = menuName

        # all registered items
        self.registeredItems = {}
        
        # all registered thresholds
        self.registeredThresholds = {}

        # get L1Topo trigger line connections
        if topoMenu=="MATCH": topoMenu = self.menuName # topo menu name should match CTP menu for correct connection
        self.topotriggers = self.getL1TopoTriggerLines(topoMenu)
        self.registerAllTopoTriggersAsThresholds()

        # menu
        self.menu = Lvl1Menu(self.menuName)
        
        if self.inputFile != None:
            """Read menu from XML"""
            self.l1menuFromXML = True
            self.menu.readMenuFromXML(self.inputFile)
            
        else:
            """Build menu from menu name"""

            # defines the menu (item and threshold names)
            TriggerConfigLVL1.defineMenu(self.menuName)

            # registers all items ever defined
            self.registerMenu()
コード例 #38
0
def addExpressStream(triggerPythonConfig):
    Names = {}
    menu_name = TriggerFlags.triggerMenuSetup()
    if menu_name.startswith('L1_pp_v4') or menu_name.startswith('Physics_pp_v4') or menu_name.startswith('MC_pp_v4'):
        Names = ExpressNamesPPV4
    elif menu_name.startswith('L1_pp_v5') or menu_name.startswith('Physics_pp_v5') or menu_name.startswith('MC_pp_v5'):
        Names = ExpressNamesPPV5


    for chainName, chainPrescale in Names.iteritems():
        if chainName not in triggerPythonConfig.allChains.keys():
            log.warning('Signature %s not registered to TriggerPythonConfig' % chainName)
            continue

        if  len(triggerPythonConfig.allChains[chainName]) ==2:
            efchain = triggerPythonConfig.allChains[chainName][1]
            efchain.addStreamTag('express', type='express', obeyLB='yes', prescale=chainPrescale)
        elif len(triggerPythonConfig.allChains[chainName]) == 1: #this is needed for hi jets
            efchain = triggerPythonConfig.allChains[chainName][0]
            efchain.addStreamTag('express', type='express', obeyLB='yes', prescale=chainPrescale)
コード例 #39
0
def setDefaultBunchGroupDefinition(bgs):
    """
    sets default bunchgroups for all menus, needed for simulation.
    """
    from TriggerJobOpts.TriggerFlags import TriggerFlags

    bgs.bunchGroups = Limits.NumBunchgroups * [None]

    # BGS and BG names
    bgs.name = TriggerFlags.triggerMenuSetup().partition('_')[0]
    bunchgroupnames = Lvl1Flags.BunchGroupNames()[:Limits.NumBunchgroups]
    bunchgroupnames += ['BG_%i' % i for i in range( len(bunchgroupnames), Limits.NumBunchgroups)]

    for i,bgname in enumerate(bunchgroupnames):
        bgs.addBunchGroup( bgname, i, [] )

    # this bunchgroups need to be filled for MC simulation
    #    if 'MC_' in TriggerFlags.triggerMenuSetup():
    bgs.bunchGroups[0].bunches = [1]
    bgs.bunchGroups[1].bunches = [1]
    bgs.bunchGroups[7].bunches = [1]
コード例 #40
0
    def registerItems(tm):
        """Register LVL1 thresholds for further use"""

        # register all thresholds ...
        from ThresholdDef import ThresholdDef
        ThresholdDef.registerThresholds(tm)

        # ... and make them accessible by their name
        for thr in tm.registeredThresholds.values():
            exec("%s = ThrCondition(thr)" % thr.getVarName())
            
        # InternalTriggers
        for i in range( Limits.NumBunchgroups ):
            exec("BGRP%i = Logic(Lvl1InternalTrigger('BGRP%i'))" % (i,i))

        for i in range( Limits.NumRndmTriggers ):
            exec("RNDM%i = Logic(Lvl1InternalTrigger('RNDM%i'))" % (i,i))


        LVL1MenuItem.l1configForRegistration = tm  # from now on all new LVL1MenuItems are registered to tm

        # Setting up bunch group and BPTX conditions
        physcond            = BGRP0 & BGRP1
        calibcond           = BGRP0 & BGRP2
        cosmiccond          = BGRP0 & BGRP3
        unpaired_isocond    = BGRP0 & BGRP4 # unpaired isolated (satellite bunches)
        unpaired_nonisocond = BGRP0 & BGRP5 # unpaired non-isolated (parasitic bunches)
        firstempty          = BGRP0 & BGRP6
        unpairedRcond       = BGRP0 & BGRP7 # unpaired beams 1 oR beam 2
        bgrp7cond           = BGRP0 & BGRP7 # No unpaired anymore

        # partition 1
        bgrpcond1           = BGRP0 & BGRP11
        calibcond1          = BGRP0 & BGRP12

        # partition 2
        bgrpcond2           = BGRP0 & BGRP14


        LVL1MenuItem.currentPartition = 1


        # E/gamma ctpid=[0:0x1f]
        emTT = TT.calo | TT.caloem
        LVL1MenuItem('L1_EM3'       ).setLogic( EM3        & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM4'       ).setLogic( EM4        & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM5'       ).setLogic( EM5        & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM7'       ).setLogic( EM7        & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM10'      ).setLogic( EM10       & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM8I'      ).setLogic( EM8I       & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM12'      ).setLogic( EM12       & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM14'      ).setLogic( EM14       & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM15'      ).setLogic( EM15       & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM15I'     ).setLogic( EM15I      & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM15HI'    ).setLogic( EM15HI     & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM16'      ).setLogic( EM16       & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM8VH'     ).setLogic( EM8VH      & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM10VH'    ).setLogic( EM10VH     & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM13VH'    ).setLogic( EM10VH     & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM15VH'    ).setLogic( EM15VH     & physcond).setTriggerType( emTT )  
        LVL1MenuItem('L1_EM18VH'    ).setLogic( EM18VH     & physcond).setTriggerType( emTT )  
        LVL1MenuItem('L1_EM20VH'    ).setLogic( EM20VH     & physcond).setTriggerType( emTT )  
        LVL1MenuItem('L1_EM20VHI'   ).setLogic( EM20VHI    & physcond).setTriggerType( emTT )  # isolation not yet defined
        LVL1MenuItem('L1_EM22VHLIL' ).setLogic( EM22VHLIL  & physcond).setTriggerType( emTT )  # isolation not yet defined
        LVL1MenuItem('L1_EM50V'     ).setLogic( EM50V      & physcond).setTriggerType( emTT )



        # 2xEM, 3xEM
        LVL1MenuItem('L1_2EM3'           ).setLogic( EM3.x(2)             & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM5'           ).setLogic( EM5.x(2)             & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM8VH'         ).setLogic( EM8VH.x(2)           & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM10VH'        ).setLogic( EM10VH.x(2)          & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM15'          ).setLogic( EM15.x(2)            & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM15VH'        ).setLogic( EM15VH.x(2)          & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM7_2EM3'       ).setLogic( EM7 & EM3.x(2)       & physcond).setTriggerType( emTT )

        LVL1MenuItem('L1_EM12_2EM3'      ).setLogic( EM12 & EM3.x(2)      & physcond).setTriggerType( emTT )
        # 4xEM
        LVL1MenuItem('L1_EM15VH_3EM7'   ).setLogic( EM15VH & EM7.x(3)    & physcond).setTriggerType( emTT )

        # EM and jet
        LVL1MenuItem('L1_J15.23ETA49' ).setLogic( J1523ETA49 & physcond).setTriggerType(TT.calo)

        # HI
        LVL1MenuItem('L1_EM3_NZ'         ).setLogic( EM3      & Not(ZDC_AND) & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM3_NZ'        ).setLogic( EM3.x(2) & Not(ZDC_AND) & physcond).setTriggerType( emTT )   

        LVL1MenuItem('L1_EM3_NL'         ).setLogic( EM3      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_2EM3_NL'        ).setLogic( EM3.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType( emTT )

        LVL1MenuItem('L1_EM3_MV'         ).setLogic( EM3      & Not(MBTS_A & MBTS_C) & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM3_MV_VTE50'   ).setLogic( EM3      & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType( emTT ) 

        LVL1MenuItem('L1_EM3_TE50'       ).setLogic( EM3      & TE50 & physcond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM3_VTE50'      ).setLogic( EM3      & Not(TE50) & physcond).setTriggerType( emTT )

        LVL1MenuItem('L1_EM3_UNPAIRED_ISO'   ).setLogic(EM3 & unpaired_isocond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM3_UNPAIRED_NONISO').setLogic(EM3 & unpaired_nonisocond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM3_EMPTY'          ).setLogic(EM3 & cosmiccond).setTriggerType( emTT )
        LVL1MenuItem('L1_EM3_FIRSTEMPTY'     ).setLogic(EM3 & firstempty).setTriggerType( emTT )

        LVL1MenuItem('L1_EM5_EMPTY'          ).setLogic(EM5 & cosmiccond).setTriggerType( emTT )

        LVL1MenuItem('L1_EM7_EMPTY'          ).setLogic(EM7 & cosmiccond).setTriggerType( emTT )

# MUON ctpid=[0x20;0x2f]
        LVL1MenuItem('L1_MU0'  ).setLogic( MU0  & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU4'  ).setLogic( MU4  & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU6'  ).setLogic( MU6  & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU10' ).setLogic( MU10 & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU11' ).setLogic( MU11 & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU15' ).setLogic( MU15 & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU20' ).setLogic( MU20 & physcond).setTriggerType(TT.rpcin)

        # 2xMU, 3xMU, 4xMU
        LVL1MenuItem('L1_2MU0'     ).setLogic( MU0.x(2)        & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU4'     ).setLogic( MU4.x(2)        & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU6'     ).setLogic( MU6.x(2)        & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU10'    ).setLogic( MU10.x(2)       & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU11'    ).setLogic( MU11.x(2)       & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU20'    ).setLogic( MU20.x(2)       & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU4_MU10' ).setLogic( MU4 & MU10      & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU6_MU10' ).setLogic( MU6 & MU10      & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU10_2MU6').setLogic( MU10 & MU6.x(2) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU10_2MU4').setLogic( MU10 & MU4.x(2) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_3MU4'     ).setLogic( MU4.x(3)        & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_3MU6'     ).setLogic( MU6.x(3)        & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU0_MU6' ).setLogic( MU0.x(2) & MU6  & physcond).setTriggerType(TT.rpcin)

        # HI
        LVL1MenuItem('L1_MU0_NZ'   ).setLogic( MU0      & Not(ZDC_AND) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU0_NZ'  ).setLogic( MU0.x(2) & Not(ZDC_AND) & physcond).setTriggerType(TT.rpcin)   

        LVL1MenuItem('L1_MU0_NL'   ).setLogic( MU0      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU0_NL'  ).setLogic( MU0.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.rpcin)                  
                            
        LVL1MenuItem('L1_MU0_MV'   ).setLogic( MU0      & Not(MBTS_A & MBTS_C) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2MU0_MV'  ).setLogic( MU0.x(2) & Not(MBTS_A & MBTS_C) & physcond).setTriggerType(TT.rpcin)
        
        LVL1MenuItem('L1_MU0_TE50' ).setLogic( MU0      & TE50 & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU4_TE50' ).setLogic( MU4      & TE50 & physcond).setTriggerType(TT.rpcin)
        
        LVL1MenuItem('L1_MU0_VTE50').setLogic( MU0      & Not(TE50) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU4_VTE50').setLogic( MU4      & Not(TE50) & physcond).setTriggerType(TT.rpcin)

        LVL1MenuItem('L1_MU0_MV_VTE50').setLogic( MU0 & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_MU4_MV_VTE50').setLogic( MU4 & Not(MBTS_A & MBTS_C) & Not(TE50) & physcond).setTriggerType(TT.rpcin)

        LVL1MenuItem('L1_MU0_UNPAIRED_ISO'   ).setLogic(MU0 & unpaired_isocond   ).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_MU0_UNPAIRED_NONISO').setLogic(MU0 & unpaired_nonisocond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_MU0_EMPTY'          ).setLogic(MU0 & cosmiccond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_MU0_FIRSTEMPTY'     ).setLogic(MU0 & firstempty).setTriggerType( TT.rpcin )

        LVL1MenuItem('L1_MU4_UNPAIRED_ISO'   ).setLogic(MU4 & unpaired_isocond   ).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_MU4_UNPAIRED_NONISO').setLogic(MU4 & unpaired_nonisocond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_MU4_EMPTY'          ).setLogic(MU4 & cosmiccond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_MU4_FIRSTEMPTY'     ).setLogic(MU4 & firstempty).setTriggerType( TT.rpcin )

        LVL1MenuItem('L1_MU6_FIRSTEMPTY'     ).setLogic(MU4  & firstempty).setTriggerType( TT.rpcin ) 
        LVL1MenuItem('L1_MU11_EMPTY'         ).setLogic(MU11 & cosmiccond).setTriggerType( TT.rpcin ) 
        
        LVL1MenuItem('L1_2MU0_EMPTY'         ).setLogic(MU0.x(2) & cosmiccond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_2MU4_EMPTY'         ).setLogic(MU4.x(2) & cosmiccond).setTriggerType( TT.rpcin ) 
        LVL1MenuItem('L1_2MU6_UNPAIRED_ISO'  ).setLogic(MU6.x(2) & unpaired_isocond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_2MU6_UNPAIRED_NONISO').setLogic(MU6.x(2) & unpaired_nonisocond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_2MU6_EMPTY'         ).setLogic(MU6.x(2) & cosmiccond).setTriggerType( TT.rpcin )
        LVL1MenuItem('L1_2MU6_FIRSTEMPTY'    ).setLogic(MU6.x(2) & firstempty).setTriggerType( TT.rpcin )
        
        # EM and MU
        LVL1MenuItem('L1_EM6_MU10'   ).setLogic( EM6        & MU10     & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_EM8_MU10'   ).setLogic( EM8        & MU10     & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_EM15_MU4'   ).setLogic( EM15       & MU4      & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_EM15VH_MU10').setLogic( EM15VH     & MU10     & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_EM3_MU20'   ).setLogic( EM3        & MU20     & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_2EM8VH_MU10').setLogic( EM8VH.x(2) & MU10     & physcond).setTriggerType(TT.rpcin)
        LVL1MenuItem('L1_EM8VH_2MU6' ).setLogic( EM8VH      & MU6.x(2) & physcond).setTriggerType(TT.rpcin)


        # TAU ctpid=[0x40:0x4f]
        LVL1MenuItem('L1_TAU6'  ).setLogic( HA6   & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU8'  ).setLogic( HA8   & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU12' ).setLogic( HA12  & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU12I').setLogic( HA12I & physcond).setTriggerType( TT.calo )

        LVL1MenuItem('L1_TAU20' ).setLogic( HA20  & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU30' ).setLogic( HA30  & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU40' ).setLogic( HA40  & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU60' ).setLogic( HA60  & physcond).setTriggerType( TT.calo )

        LVL1MenuItem('L1_TAU8_UNPAIRED_ISO'   ).setLogic( HA8   & unpaired_isocond ).setTriggerType( TT.calo ) 

        LVL1MenuItem('L1_TAU8_UNPAIRED_NONISO').setLogic( HA8   & unpaired_nonisocond ).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU8_EMPTY'          ).setLogic( HA8   & cosmiccond ).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU8_FIRSTEMPTY'     ).setLogic( HA8   & firstempty ).setTriggerType( TT.calo )
        
        # 3xTAU
        LVL1MenuItem('L1_TAU20_2TAU12'  ).setLogic( HA20 & HA12.x(2)  & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU20_2TAU12I' ).setLogic( HA20 & HA12I.x(2) &  physcond).setTriggerType( TT.calo )


        # mixed tau
        LVL1MenuItem('L1_EM15VH_2TAU12'                ).setLogic( EM15VH  & HA12.x(2)          & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15VH_2TAU12IL'              ).setLogic( EM15VH  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15HI_2TAU12IL'              ).setLogic( EM15HI  & HA12IL.x(2)        & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15_2TAU12'                  ).setLogic( EM15    & HA12.x(2)          & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15_2TAU20'                  ).setLogic( EM15    & HA20.x(2)          & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15VH_2TAU20'                ).setLogic( EM15VH  & HA20.x(2)          & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15_TAU40_2TAU15'            ).setLogic( EM15    & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15HI_TAU40_2TAU15'          ).setLogic( EM15HI  & HA40 & HA15.x(2)   & physcond).setTriggerType( TT.calo )

        LVL1MenuItem('L1_EM15_2TAU12_J25_2J15_3J12'    ).setLogic( EM15  & HA12.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15HI_2TAU12I_J25_2J15_3J12'  ).setLogic( EM15  & HA12I.x(2)  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )

        LVL1MenuItem('L1_MU10_TAU12'       ).setLogic( MU10  & HA12          & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_MU10_TAU12I'      ).setLogic( MU10  & HA12I         & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_MU10_TAU20'       ).setLogic( MU10  & HA20          & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_MU10_TAU20I'       ).setLogic( MU10  & HA20I        & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU12I_MU10_J25'  ).setLogic( HA12I & MU10 & J25    & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU12I_MU10_J25_2J12'  ).setLogic( HA12I & MU10 & J25 & J12.x(2)  & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_MU10_TAU12_J25_2J12' ).setLogic( MU10 & HA12 & J25 & J12.x(2)     & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU12I_MU10_J20.32ETA49' ).setLogic( HA12I & MU10 & J2032ETA49    & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU20_2TAU12I_J25_2J15_3J12'   ).setLogic( HA20 & HA12I.x(2)     & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU20_2TAU12_J25_2J20_3J12'   ).setLogic( HA20 & HA12.x(2)     & J25 & J20.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_2TAU12I_TAU20_J25_2J15_3J12'  ).setLogic( HA12I.x(2)   & HA20  & J25 & J15.x(2) & J12.x(3) & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU20_2J20_XE45'              ).setLogic( HA20    & J20.x(2)   & XE45 & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU20_2TAU12_XE35'            ).setLogic( HA20    & HA12.x(2)  & XE35 & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_EM15HI_2TAU12I_XE35'          ).setLogic( EM15HI  & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_MU10_TAU12I_XE35'             ).setLogic( MU10    & HA12I      & XE35 & physcond).setTriggerType( TT.calo )
        LVL1MenuItem('L1_TAU20I_2TAU12I_XE35'          ).setLogic( HA20I   & HA12I.x(2) & XE35 & physcond).setTriggerType( TT.calo )




        # JET ctpid=[0x60:0x7f]
        LVL1MenuItem('L1_J10'   ).setLogic( J10  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J12'   ).setLogic( J12  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J15'   ).setLogic( J15  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J20'   ).setLogic( J20  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J30'   ).setLogic( J30  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J40'   ).setLogic( J40  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J50'   ).setLogic( J50  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J75'   ).setLogic( J75  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J100'  ).setLogic( J100 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J120'  ).setLogic( J120 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J175'  ).setLogic( J175 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J250'  ).setLogic( J250 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J400'  ).setLogic( J400 & physcond).setTriggerType(TT.calo)

        LVL1MenuItem('L1_J10.32ETA49').setLogic( J1032ETA49 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J20.32ETA49').setLogic( J2032ETA49 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J30.32ETA49').setLogic( J3032ETA49 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J50.32ETA49').setLogic( J5032ETA49 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J75.32ETA49').setLogic( J7532ETA49 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J100.32ETA49').setLogic( J10032ETA49 & physcond).setTriggerType(TT.calo)


        LVL1MenuItem('L1_J10_UNPAIRED_ISO'   ).setLogic( J10 & unpaired_isocond   ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J10_UNPAIRED_NONISO').setLogic( J10 & unpaired_nonisocond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J10_EMPTY').setLogic( J10 & cosmiccond ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J10_FIRSTEMPTY').setLogic( J10 & firstempty ).setTriggerType(TT.calo)

        LVL1MenuItem('L1_J12_UNPAIRED_ISO'   ).setLogic( J12 & unpaired_isocond   ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J12_UNPAIRED_NONISO').setLogic( J12 & unpaired_nonisocond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J12_EMPTY').setLogic( J12 & cosmiccond ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J12_FIRSTEMPTY').setLogic( J12 & firstempty ).setTriggerType(TT.calo)


        LVL1MenuItem('L1_J30_EMPTY').setLogic( J30 & cosmiccond ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J30_UNPAIRED').setLogic( J30 & unpairedRcond ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J30_FIRSTEMPTY').setLogic( J30 & firstempty ).setTriggerType(TT.calo)

        LVL1MenuItem('L1_J10.32ETA49_EMPTY').setLogic( J1032ETA49 & cosmiccond ).setTriggerType(TT.calo)



        LVL1MenuItem('L1_J30.32ETA49_EMPTY').setLogic( J3032ETA49 & cosmiccond ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J30.32ETA49_FIRSTEMPTY').setLogic( J3032ETA49 & firstempty ).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J30.32ETA49_UNPAIRED_ISO'   ).setLogic( J3032ETA49 & unpaired_isocond   ).setTriggerType(TT.calo)
        
        # multi jet
        LVL1MenuItem('L1_2J25.32ETA49'  ).setLogic( JF25 & JB25 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_2J15'   ).setLogic( J15.x(2)    & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_3J15'   ).setLogic( J15.x(3)    & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_3J20'   ).setLogic( J20.x(3)    & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_3J50'   ).setLogic( J50.x(3)    & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_3J75'   ).setLogic( J75.x(3)    & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_4J20'   ).setLogic( J20.x(4)    & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_4J30'   ).setLogic( J30.x(4)    & physcond).setTriggerType(TT.calo)

        LVL1MenuItem('L1_4J17.0ETA22' ).setLogic( J170ETA22.x(4) & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_3J25.0ETA22' ).setLogic( J250ETA22.x(3) & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_3J15.0ETA24' ).setLogic( J150ETA24.x(3) & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_5J15.0ETA24' ).setLogic( J150ETA24.x(5) & physcond).setTriggerType(TT.calo)

        if ('Physics_HI_v3' in TriggerFlags.triggerMenuSetup()):
            LVL1MenuItem('L1_ZB', ctpid=240).setLogic(ZB_J75 & physcond).setTriggerType(TT.zerobs)
        
        # combined jet - xe
        #LVL1MenuItem('L1_J40_XE50').setLogic( J75 & XE40 & physcond).setTriggerType(TT.calo)#CB ERROR???
        LVL1MenuItem('L1_J40_XE50').setLogic( J40 & XE50 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_J75_XE40').setLogic( J75 & XE40 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_2J15_XE55').setLogic( J15.x(2) & XE55 & physcond).setTriggerType(TT.calo)


        # combined em - jet
        LVL1MenuItem('L1_EM15VH_J15.23ETA49' ).setLogic( EM15VH  & J1523ETA49  & physcond).setTriggerType(TT.calo)

        # HI
        LVL1MenuItem('L1_J15_NZ' ).setLogic( J15      & Not(ZDC_AND) & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_2J15_NZ').setLogic( J15.x(2) & Not(ZDC_AND) & physcond).setTriggerType(TT.calo)   

        LVL1MenuItem('L1_J15_NL' ).setLogic( J15      & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_2J15_NL').setLogic( J15.x(2) & Not(LUCID_A) & Not(LUCID_C) & physcond).setTriggerType(TT.calo)
        
        # XE
        LVL1MenuItem('L1_XE35').setLogic( XE35 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_XE45').setLogic( XE45 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_XE50').setLogic( XE50 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_XE55').setLogic( XE55 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_XE60').setLogic( XE60 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_XE70').setLogic( XE70 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_XE80').setLogic( XE80 & physcond).setTriggerType(TT.calo)


        # TE
        LVL1MenuItem('L1_TE5' ).setLogic( TE5  & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE10').setLogic( TE10 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE20').setLogic( TE20 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE30').setLogic( TE30 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE40').setLogic( TE40 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE50').setLogic( TE50 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE60').setLogic( TE60 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE2000').setLogic( TE2000 & physcond).setTriggerType(TT.calo)
        LVL1MenuItem('L1_TE4000').setLogic( TE4000 & physcond).setTriggerType(TT.calo)

        LVL1MenuItem('L1_TE5_NZ').setLogic( TE5 & Not(ZDC_AND) & physcond).setTriggerType(TT.calo) 
        
        # MBTS
        MBTS_1   = MBTS_A | MBTS_C
        MBTS_2   = (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_A) & (MBTS_A.x(2) | MBTS_C.x(2) | MBTS_C)
        MBTS_1_1 = MBTS_A & MBTS_C
        MBTS_2_2 = MBTS_A.x(2) & MBTS_C.x(2)
        MBTS_3_3 = MBTS_A.x(3) & MBTS_C.x(3)
        MBTS_4_4 = MBTS_A.x(4) & MBTS_C.x(4)
        
        LVL1MenuItem('L1_MBTS_1'             ).setLogic( MBTS_1   & physcond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2'             ).setLogic( MBTS_2   & physcond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_1_1'           ).setLogic( MBTS_1_1 & physcond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_2'           ).setLogic( MBTS_2_2 & physcond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_3_3'           ).setLogic( MBTS_3_3 & physcond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_4_4'           ).setLogic( MBTS_4_4 & physcond ).setTriggerType(TT.minb)

        
        LVL1MenuItem('L1_MBTS_1_UNPAIRED_ISO'  ).setLogic( MBTS_1   & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_UNPAIRED_ISO'  ).setLogic( MBTS_2   & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_1_1_UNPAIRED_ISO').setLogic( MBTS_1_1 & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_2_UNPAIRED_ISO').setLogic( MBTS_2_2 & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_3_3_UNPAIRED_ISO').setLogic( MBTS_3_3 & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_4_4_UNPAIRED_ISO').setLogic( MBTS_3_3 & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_1_UNPAIRED_NONISO').setLogic( MBTS_1 & unpaired_nonisocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_UNPAIRED_NONISO').setLogic( MBTS_2 & unpaired_nonisocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_1_EMPTY'       ).setLogic( MBTS_1   & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_EMPTY'       ).setLogic( MBTS_2   & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_1_1_EMPTY'     ).setLogic( MBTS_1_1 & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_2_EMPTY'     ).setLogic( MBTS_2_2 & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_3_3_EMPTY'     ).setLogic( MBTS_3_3 & cosmiccond ).setTriggerType(TT.minb)
        
        LVL1MenuItem('L1_MBTS_1_1_VTE50'     ).setLogic( MBTS_1_1  & Not(TE50) & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTS_2_2_VTE50'     ).setLogic( MBTS_2_2  & Not(TE50) & physcond).setTriggerType(TT.minb)

        LVL1MenuItem('L1_MBTSA0' ).setLogic( MBTS_A0 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA1' ).setLogic( MBTS_A1 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA2' ).setLogic( MBTS_A2 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA3' ).setLogic( MBTS_A3 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA4' ).setLogic( MBTS_A4 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA5' ).setLogic( MBTS_A5 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA6' ).setLogic( MBTS_A6 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA7' ).setLogic( MBTS_A7 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA8' ).setLogic( MBTS_A8 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA10').setLogic( MBTS_A10 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA12').setLogic( MBTS_A12 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSA14').setLogic( MBTS_A14 & physcond).setTriggerType(TT.minb)
        # L1_MBTSA/C 9, 11, 13, 15 are removed in Run 2

        LVL1MenuItem('L1_MBTSC0' ).setLogic( MBTS_C0 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC1' ).setLogic( MBTS_C1 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC2' ).setLogic( MBTS_C2 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC3' ).setLogic( MBTS_C3 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC4' ).setLogic( MBTS_C4 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC5' ).setLogic( MBTS_C5 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC6' ).setLogic( MBTS_C6 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC7' ).setLogic( MBTS_C7 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC8' ).setLogic( MBTS_C8 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC10').setLogic( MBTS_C10 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC12').setLogic( MBTS_C12 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_MBTSC14').setLogic( MBTS_C14 & physcond).setTriggerType(TT.minb)
        
        # ZDC
        ZDC_A_C = ZDC_A & ZDC_C
        
        LVL1MenuItem('L1_ZDC'               ).setLogic((ZDC_A | ZDC_C) & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_A'             ).setLogic( ZDC_A & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_C'             ).setLogic( ZDC_C & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_AND'           ).setLogic( ZDC_AND & physcond).setTriggerType(TT.minb) 
        LVL1MenuItem('L1_ZDC_A_C'           ).setLogic( ZDC_A_C & physcond).setTriggerType(TT.minb)

        LVL1MenuItem('L1_ZDC_A_C_OVERLAY'   ).setLogic( ZDC_A_C & physcond).setTriggerType(TT.zerobs)     
        
        LVL1MenuItem('L1_ZDC_AND_VTE50'     ).setLogic( ZDC_AND & Not(TE50) & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_A_C_VTE50'     ).setLogic( ZDC_A_C & Not(TE50) & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_A_C_TE50'      ).setLogic( ZDC_A_C & TE50 & physcond).setTriggerType(TT.minb)

        LVL1MenuItem('L1_ZDC_MBTS_1'        ).setLogic((ZDC_A | ZDC_C) & MBTS_1 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_MBTS_2'        ).setLogic((ZDC_A | ZDC_C) & MBTS_2 & physcond).setTriggerType(TT.minb)

        LVL1MenuItem('L1_ZDC_MBTS_1_1'      ).setLogic((ZDC_A | ZDC_C) & MBTS_1_1 & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_MBTS_2_2'      ).setLogic((ZDC_A | ZDC_C) & MBTS_2_2 & physcond).setTriggerType(TT.minb)

        LVL1MenuItem('L1_ZDC_EMPTY'           ).setLogic( (ZDC_A | ZDC_C) & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_UNPAIRED_ISO'    ).setLogic( (ZDC_A | ZDC_C) & unpaired_isocond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_UNPAIRED_NONISO' ).setLogic( (ZDC_A | ZDC_C) & unpaired_nonisocond ).setTriggerType(TT.minb)

        LVL1MenuItem('L1_ZDC_AND_EMPTY'           ).setLogic( ZDC_AND & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_AND_UNPAIRED_ISO'    ).setLogic( ZDC_AND & unpaired_isocond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_AND_UNPAIRED_NONISO' ).setLogic( ZDC_AND & unpaired_nonisocond ).setTriggerType(TT.minb)

        LVL1MenuItem('L1_ZDC_A_C_EMPTY'           ).setLogic( ZDC_A_C & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_ISO'    ).setLogic( ZDC_A_C & unpaired_isocond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_ZDC_A_C_UNPAIRED_NONISO' ).setLogic( ZDC_A_C & unpaired_nonisocond ).setTriggerType(TT.minb)
        
        # VDM
        LVL1MenuItem('L1_ZDC_A_C_BGRP7'     ).setLogic( ZDC_A_C & bgrp7cond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID_BGRP7'       ).setLogic( (LUCID_A | LUCID_C) & bgrp7cond).setTriggerType(TT.minb)
        
        # LUCID
        LVL1MenuItem('L1_LUCID_A'           ).setLogic( LUCID_A             & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID_C'           ).setLogic( LUCID_C             & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID_A_C',        ).setLogic( LUCID_A & LUCID_C   & physcond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID'             ).setLogic((LUCID_A | LUCID_C)  & physcond).setTriggerType(TT.minb)
        #LVL1MenuItem('L1_LUCID_COMM'        ).setLogic( NIMDIR5             & physcond).setTriggerType(TT.minb)  # will change in run 2
        #LVL1MenuItem('L1_LUCID_COMM_EMPTY'  ).setLogic( NIMDIR5             & cosmiccond).setTriggerType(TT.minb)  # will change in run 2
        LVL1MenuItem('L1_LUCID_EMPTY'       ).setLogic((LUCID_A | LUCID_C)  & cosmiccond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID_A_C_EMPTY'   ).setLogic( LUCID_A & LUCID_C   & cosmiccond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID_UNPAIRED_ISO').setLogic((LUCID_A | LUCID_C)  & unpaired_isocond).setTriggerType(TT.minb)
        #LVL1MenuItem('L1_LUCID_COMM_UNPAIRED_ISO' ).setLogic( NIMDIR5       & unpaired_isocond ).setTriggerType(TT.minb) # will change in run 2
        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_ISO'  ).setLogic( LUCID_A & LUCID_C & unpaired_isocond).setTriggerType(TT.minb)
        LVL1MenuItem('L1_LUCID_A_C_UNPAIRED_NONISO').setLogic(LUCID_A & LUCID_C & unpaired_nonisocond).setTriggerType(TT.minb)
        
        # BCM
        LVL1MenuItem('L1_BCM_Wide'                   ).setLogic( BCM_Wide & physcond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_BCM_Wide_BGRP0'             ).setLogic( BCM_Wide & BGRP0 ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_BCM_Wide_EMPTY'             ).setLogic( BCM_Wide & cosmiccond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_ISO'      ).setLogic( BCM_Wide & unpaired_isocond ).setTriggerType(TT.minb)
        LVL1MenuItem('L1_BCM_Wide_UNPAIRED_NONISO'   ).setLogic( BCM_Wide & unpaired_nonisocond ).setTriggerType(TT.minb)

        LVL1MenuItem('L1_BCM_HT_BGRP0'               ).setLogic( BCM_Comb.x(7) & BGRP0).setTriggerType(TT.minb)
        LVL1MenuItem('L1_BCM_AC_CA_BGRP0'            ).setLogic((BCM_AtoC|BCM_CtoA) & BGRP0).setTriggerType(TT.minb) 
        LVL1MenuItem('L1_BCM_AC_CA_UNPAIRED_ISO'     ).setLogic((BCM_AtoC|BCM_CtoA)&unpaired_isocond).setTriggerType(TT.minb)
        
        # RANDOM
        LVL1MenuItem('L1_RD0_FILLED'         ).setLogic( RNDM0 & physcond           ).setTriggerType(TT.rand)
        LVL1MenuItem('L1_RD0_EMPTY'          ).setLogic( RNDM0 & cosmiccond         ).setTriggerType(TT.rand)
        LVL1MenuItem('L1_RD0_UNPAIRED_ISO'   ).setLogic( RNDM0 & unpaired_isocond   ).setTriggerType(TT.rand)
        LVL1MenuItem('L1_RD0_FIRSTEMPTY'     ).setLogic( RNDM0 & firstempty         ).setTriggerType(TT.rand)

        LVL1MenuItem('L1_RD1_FILLED'         ).setLogic( RNDM1 & physcond           ).setTriggerType(TT.rand)
        LVL1MenuItem('L1_RD1_EMPTY'          ).setLogic( RNDM1 & cosmiccond         ).setTriggerType(TT.rand)

        # BGRP
        LVL1MenuItem('L1_BGRP0').setLogic( BGRP0 ).setTriggerType(TT.rand)
        LVL1MenuItem('L1_BGRP1').setLogic( BGRP0 & BGRP1 ).setTriggerType(TT.rand)
        LVL1MenuItem('L1_BGRP7').setLogic( BGRP0 & BGRP7 ).setTriggerType(TT.rand)

        LVL1MenuItem('L1_BPTX0_BGRP0', ctpid=0xf1).setLogic(BPTX0 & BGRP0).setTriggerType(TT.rand)
        LVL1MenuItem('L1_BPTX1_BGRP0', ctpid=0xf2).setLogic(BPTX1 & BGRP0).setTriggerType(TT.rand)   
        
        # lumi measurements
        LVL1MenuItem('L1_MLZ_A', ctpid=-1).setLogic( (MBTS_A|ZDC_A|LUCID_A) & physcond).setTriggerType(TT.minb) 
        LVL1MenuItem('L1_MLZ_C', ctpid=-1).setLogic( (MBTS_C|ZDC_C|LUCID_C) & physcond).setTriggerType(TT.minb) 
        LVL1MenuItem('L1_MBLZ',  ctpid=-1).setLogic( ( (MBTS_A|ZDC_A|LUCID_A) & (MBTS_C|ZDC_C|LUCID_C) | BCM_Wide) & physcond ).setTriggerType(TT.minb)  

        LVL1MenuItem('L1_CALREQ0', ctpid=0xfd).setLogic( CAL0 & calibcond).setTriggerType(TT.calreq0)
        LVL1MenuItem('L1_CALREQ1', ctpid=0xfe).setLogic( CAL1 & calibcond).setTriggerType(TT.calreq1)
        LVL1MenuItem('L1_CALREQ2', ctpid=0xff).setLogic( CAL2 & calibcond).setTriggerType(TT.calreq2)   

        # TRT
        LVL1MenuItem('L1_TRT', ctpid=0x4e).setLogic(NIMTRT & BGRP0).setTriggerType(TT.rpcout)

        # ALFA will be very different for run 2
        # LVL1MenuItem('L1_ALFA_EMPTY').setLogic( NIM_ALFA_LOG & cosmiccond).setTriggerType(TT.rpcout)

        # Topo items (keep them all together)
        try:

            # B-jet
            LVL1MenuItem('L1_0DR04-MU4ab-CJ15ab', ctpid=-1).setLogic( TOPO_0DR04_MU4ab_CJ15ab & physcond)
            LVL1MenuItem('L1_0DR04-MU4ab-CJ30ab', ctpid=-1).setLogic( TOPO_0DR04_MU4ab_CJ30ab & physcond)
            LVL1MenuItem('L1_0DR04-MU6ab-CJ25ab', ctpid=-1).setLogic( TOPO_0DR04_MU6ab_CJ25ab & physcond)
            LVL1MenuItem('L1_0DR04-MU4ab-CJ17ab', ctpid=-1).setLogic( TOPO_0DR04_MU4ab_CJ17ab & physcond) 
            LVL1MenuItem('L1_0DR04-MU4ab-CJ20ab', ctpid=-1).setLogic( TOPO_0DR04_MU4ab_CJ20ab & physcond)

            # ZH
            LVL1MenuItem('L1_J40_10MINDPHI-Js2-XE50',   ctpid=-1).setLogic( J40 & TOPO_10MINDPHI_Js2_XE50 & physcond) 
            LVL1MenuItem('L1_J40_10MINDPHI-J20s2-XE50', ctpid=-1).setLogic( J40 & TOPO_10MINDPHI_J20s2_XE50 & physcond) 
            LVL1MenuItem('L1_J40_10MINDPHI-J20ab-XE50', ctpid=-1).setLogic( J40 & TOPO_10MINDPHI_J20ab_XE50 & physcond) 
            LVL1MenuItem('L1_J40_10MINDPHI-CJ20ab-XE50',ctpid=-1).setLogic( J40 & TOPO_10MINDPHI_CJ20ab_XE50 & physcond) 

            # HT
            LVL1MenuItem('L1_HT0-AJ0all.ETA49',   ctpid=-1).setLogic( TOPO_HT0_AJ0allETA49 & physcond)
            
            # Jpsi T&P
            LVL1MenuItem("L1_1INVM5-EMs2-EMall",  ctpid=-1).setLogic( TOPO_1INVM5_EMs2_EMall & physcond)
            LVL1MenuItem("L1_1INVM5-EM7s2-EMall", ctpid=-1).setLogic( TOPO_1INVM5_EM7s2_EMall & physcond)
            LVL1MenuItem("L1_1INVM5-EM12s2-EMall",ctpid=-1).setLogic( TOPO_1INVM5_EM12s2_EMall & physcond)

            # W T&P
            LVL1MenuItem("L1_10MINDPHI-AJj15s2-XE0",ctpid=-1).setLogic( TOPO_10MINDPHI_AJj15s2_XE0 & physcond)
            LVL1MenuItem("L1_20MINDPHI-AJjs6-XE0",ctpid=-1).setLogic( TOPO_20MINDPHI_AJjs6_XE0 & physcond)
            LVL1MenuItem("L1_20MINDPHI-AJj15s2-XE0",ctpid=-1).setLogic( TOPO_20MINDPHI_AJj15s2_XE0 & physcond)
            LVL1MenuItem("L1_10MINDPHI-EM6s1-XE0",ctpid=-1).setLogic( TOPO_10MINDPHI_EM6s1_XE0 & physcond)
            LVL1MenuItem("L1_20MINDPHI-EM9s6-XE0",ctpid=-1).setLogic( TOPO_20MINDPHI_EM9s6_XE0 & physcond)
            LVL1MenuItem("L1_20MINDPHI-EM6s1-XE0",ctpid=-1).setLogic( TOPO_20MINDPHI_EM6s1_XE0 & physcond)
            LVL1MenuItem("L1_05RATIO-XE0-HT0-AJj15all.ETA49",ctpid=-1).setLogic( TOPO_05RATIO_XE0_HT0_AJj15allETA49 & physcond)
            LVL1MenuItem("L1_08RATIO-XE0-HT0-AJj0all.ETA49",ctpid=-1).setLogic( TOPO_08RATIO_XE0_HT0_AJj0allETA49 & physcond)
            LVL1MenuItem("L1_40RATIO2-XE0-HT0-AJj15all.ETA49",ctpid=-1).setLogic( TOPO_40RATIO2_XE0_HT0_AJj15allETA49 & physcond)
            LVL1MenuItem("L1_90RATIO2-XE0-HT0-AJj0all.ETA49",ctpid=-1).setLogic( TOPO_90RATIO2_XE0_HT0_AJj0allETA49 & physcond)
            LVL1MenuItem("L1_HT20-AJj0all.ETA49",ctpid=-1).setLogic( TOPO_HT20_AJj0allETA49 & physcond)
            LVL1MenuItem("L1_NOT-02MATCH-EM9s1-AJj15all.ETA49",ctpid=-1).setLogic( TOPO_NOT_02MATCH_EM9s1_AJj15allETA49 & physcond)
            LVL1MenuItem("L1_NOT-02MATCH-EM9s1-AJj15all.ETA49_05RATIO-XE0-SUM0-EM9s1-HT0-AJj15all.ETA49",ctpid=-1).setLogic( TOPO_NOT_02MATCH_EM9s1_AJj15allETA49 & TOPO_05RATIO_XE0_SUM0_EM9s1_HT0_AJj15allETA49 & physcond)

            # Bphysics triggers
            LVL1MenuItem("L1_2DR15-2MU4ab",  ctpid=-1).setLogic( TOPO_2DR15_2MU4ab & physcond)            
            LVL1MenuItem("L1_2INVM999-2MU4ab",  ctpid=-1).setLogic( TOPO_2INVM999_2MU4ab & physcond)            
            LVL1MenuItem("L1_4INVM8-2MU4ab",  ctpid=-1).setLogic( TOPO_4INVM8_2MU4ab & physcond)            
            LVL1MenuItem("L1_2DR15-2MU4ab_2INVM999-2MU4ab",  ctpid=-1).setLogic( TOPO_2DR15_2MU4ab & TOPO_2INVM999_2MU4ab & physcond)            
            LVL1MenuItem("L1_2DR15-2MU4ab_4INVM8-2MU4ab",  ctpid=-1).setLogic( TOPO_2DR15_2MU4ab & TOPO_4INVM8_2MU4ab & physcond)            

            LVL1MenuItem("L1_2DR15-2MU6ab",  ctpid=-1).setLogic( TOPO_2DR15_2MU6ab & physcond)            
            LVL1MenuItem("L1_2INVM999-2MU6ab",  ctpid=-1).setLogic( TOPO_2INVM999_2MU6ab & physcond)            
            LVL1MenuItem("L1_4INVM8-2MU6ab",  ctpid=-1).setLogic( TOPO_4INVM8_2MU6ab & physcond)            
            LVL1MenuItem("L1_2DR15-2MU6ab_2INVM999-2MU6ab",  ctpid=-1).setLogic( TOPO_2DR15_2MU6ab & TOPO_2INVM999_2MU6ab & physcond)            
            LVL1MenuItem("L1_2DR15-2MU6ab_4INVM8-2MU6ab",  ctpid=-1).setLogic( TOPO_2DR15_2MU6ab & TOPO_4INVM8_2MU6ab & physcond)            
            
            
        except Exception, ex:
            print "Creation of L1Topo item failed, will abort:" , ex
            raise RuntimeError("Creation of L1Topo item failed, will not continue")
コード例 #41
0
_flags.append(doEFRoIDrivenAccess)

class signatures(JobProperty):
    """ signatures in Muon slice """
    statusOn=True
    allowedTypes = ['list']
    StoredValue  = []
    #allowedValues = AllowedList(["mu4T"])

_flags.append(signatures)


# create container

class MuonSlice(JobPropertyContainer, CommonSliceHelper):
    """ Muon Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(MuonSlice)

# add add common slice flags
TriggerFlags.MuonSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.MuonSlice.add_JobProperty(flag)
del _flags

# make an alias
MuonSliceFlags = TriggerFlags.MuonSlice
コード例 #42
0
__doc__="MET slice specific flags  "


_flags = []
class signatures(JobProperty):
    """ signatures in MET slice """
    statusOn=True
    allowedTypes=['list']
    StoredValue   = []

_flags.append(signatures)


class METSlice(JobPropertyContainer, CommonSliceHelper):
    """ MET Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(METSlice)

# add add common slice flags
TriggerFlags.METSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.METSlice.add_JobProperty(flag)
del _flags

# make an alias
METSliceFlags = TriggerFlags.METSlice

#  LocalWords:  allowedTypes
コード例 #43
0
    allowedTypes=['list']
    StoredValue=[]
_flags.append(SliceList)

class signatures(JobProperty):
    """ signatures in Streaming slice """
    statusOn=True
    allowedTypes=['list']
    StoredValue= []
_flags.append(signatures)

# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class StreamingSlice(JobPropertyContainer, CommonSliceHelper):
    """ Streaming Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(StreamingSlice)

# add add common slice flags
TriggerFlags.StreamingSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.StreamingSlice.add_JobProperty(flag)
del _flags

# make an alias
StreamingSliceFlags = TriggerFlags.StreamingSlice

コード例 #44
0
    allowedTypes=['list']
    StoredValue=[]
_flags.append(SliceList)

class signatures(JobProperty):
    """ signatures in EnhancedBias slice """
    statusOn=True
    allowedTypes=['list']
    StoredValue= []
_flags.append(signatures)

# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class EnhancedBiasSlice(JobPropertyContainer, CommonSliceHelper):
    """ EnhancedBias Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(EnhancedBiasSlice)

# add add common slice flags
TriggerFlags.EnhancedBiasSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.EnhancedBiasSlice.add_JobProperty(flag)
del _flags

# make an alias
EnhancedBiasSliceFlags = TriggerFlags.EnhancedBiasSlice

コード例 #45
0
__doc__="Beamspot slice specific flags  "

_flags = [] 

class signatures(JobProperty):
    """ signatures in Beamspot slice """
    statusOn=True
    allowedTypes = ['list', 'str']
    StoredValue  = []
_flags.append(signatures)


# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class BeamspotSlice(JobPropertyContainer, CommonSliceHelper):
    """ Beamspot Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(BeamspotSlice)

# add add common slice flags
TriggerFlags.BeamspotSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.BeamspotSlice.add_JobProperty(flag)
del _flags

# make an alias
BeamspotSliceFlags = TriggerFlags.BeamspotSlice
コード例 #46
0
    
    StoredValue   = [
        ]




_flags.append(signatures)



# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class BphysicsSlice(JobPropertyContainer, CommonSliceHelper):
    """ Bphysics Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(BphysicsSlice)

# add add common slice flags
TriggerFlags.BphysicsSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.BphysicsSlice.add_JobProperty(flag)
del _flags

# make an alias
BphysicsSliceFlags = TriggerFlags.BphysicsSlice

コード例 #47
0
    allowedTypes=['list']
    StoredValue=[]
_flags.append(LVL2Payload)

class EFPayload(JobProperty):
    """ EF payload """ 
    statusOn=True
    allowedTypes=['list']
    StoredValue=[]
_flags.append(EFPayload)

# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class CosmicSlice(JobPropertyContainer, CommonSliceHelper):
    """ Cosmic Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(CosmicSlice)

# add add common slice flags
TriggerFlags.CosmicSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.CosmicSlice.add_JobProperty(flag)
del _flags

# make an alias
CosmicSliceFlags = TriggerFlags.CosmicSlice

コード例 #48
0
    StoredValue=False
    
_flags.append(doTrackingApproach)

class signatures(JobProperty):
    """ signatures in Calib slice """
    statusOn=True
    allowedTypes = ['list', 'str']
    StoredValue  = []
_flags.append(signatures)


# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class CalibSlice(JobPropertyContainer, CommonSliceHelper):
    """ Calib Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(CalibSlice)

# add add common slice flags
TriggerFlags.CalibSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.CalibSlice.add_JobProperty(flag)
del _flags

# make an alias
CalibSliceFlags = TriggerFlags.CalibSlice
コード例 #49
0
#
# SliceDef file for HLT signatures used for EnhancedBias Slice
#
#########################################################################
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger('TriggerMenu.calibcosmon.EnhancedBiasDef')

from TriggerMenu.menu.HltConfig import *
from TriggerJobOpts.TriggerFlags  import TriggerFlags

#########################################################################


##USUAL STUPID HARDCODING OF THE ITEM LISTS DEPENDING ON THE MENU 
if TriggerFlags.triggerMenuSetup() == 'LS1_v1':        
    l1_seeds ={ 
                
        'low'       : ['L1_2EM3_EM12', 'L1_XS45', 'L1_J50', 'L1_MU4_J15', 'L1_FJ30', 'L1_MU10', 'L1_J30', 'L1_TE500', 'L1_EM10VH', 'L1_EM16VH', 'L1_TE700', 'L1_XE30', 'L1_XE20', 'L1_3J15', 'L1_TAU20', 'L1_MU6', 'L1_EM12'],
        
        'high' : ['L1_EM6_MU6','L1_2EM6_EM16VH',
                         'L1_2MU4',  'L1_2MU4_MU6', 'L1_2MU4_BARREL', 
                         'L1_2MU4_2EM3', 'L1_MU4_J30',
                         'L1_XS50','L1_XS60', 'L1_FJ50', 'L1_EM16V_XE20', 'L1_MU4_J50' ] ,

        'firstempty'    :['L1_EM3_FIRSTEMPTY','L1_TAU8_FIRSTEMPTY',
                                 'L1_MU6_FIRSTEMPTY','L1_MU4_FIRSTEMPTY','L1_MU10_FIRSTEMPTY','L1_MU20_FIRSTEMPTY',                                 
                                 'L1_2MU4_FIRSTEMPTY',
                                 'L1_J10_FIRSTEMPTY''L1_J30_FIRSTEMPTY', 'L1_FJ30_FIRSTEMPTY'],

コード例 #50
0
ファイル: Lumi.py プロジェクト: lawrenceleejr/TriggerStudies
def applyPrescales(triggerPythonConfig, HLTPrescales):
    no_prescale = False
    no_Bphysics = False
    mc_loose_tight_prescale = False
    if 'no_prescale' in TriggerFlags.triggerMenuSetup() or \
       TriggerFlags.triggerMenuSetup() == 'default': no_prescale = True
    #now also the loose and tight prescales in mc
    if 'loose_mc_prescale' in TriggerFlags.triggerMenuSetup() or \
       'tight_mc_prescale' in TriggerFlags.triggerMenuSetup(): mc_loose_tight_prescale = True
        
    if 'no_Bphysics' in TriggerFlags.triggerMenuSetup(): no_Bphysics = True

    #if L1Prescales==None and TriggerFlags.L1PrescaleSet()!='':
    #    log.warning('Cannot find L1 prescale set %s, not explicitly setting them' % \
    #                TriggerFlags.L1PrescaleSet())
    #    L1Prescales = {}
    if HLTPrescales==None and TriggerFlags.HLTPrescaleSet()!='':
        log.warning('Cannot find HLT prescale set %s, not explicitly setting them' % \
                    TriggerFlags.HLTPrescaleSet())
        HLTPrescales = {}
        
    #-----------------------------------------------------------------------
    hlt_sigs = allSignatures()
##     print 'N hlt prescales: ', len(HLTPrescales)
##     print 'N hlt prescales: ', len(L1Prescales)
    #applyLVL1Prescale(triggerPythonConfig, L1Prescales)
    
    if TriggerFlags.doHLT():
        applyHLTPrescale(triggerPythonConfig, HLTPrescales)
    #
    if TriggerFlags.L1PrescaleSet() == 'None':
        for item in triggerPythonConfig.allItems.values():
            item.prescale = '1' 
    if TriggerFlags.HLTPrescaleSet() == 'None':
        for  sig in triggerPythonConfig.allChains.values():
            for chain in sig:
                chain.prescale = '1'
                chain.pass_through = '0'
                tmp_stag = chain.stream_tag
                chain.stream_tag = []
                for s in tmp_stag:
                    chain.addStreamTag(s[0], s[1], s[2], 1)

    if no_prescale:
        resetAllPrescales(triggerPythonConfig)

    if TriggerFlags.disableRandomPrescale() or no_prescale or mc_loose_tight_prescale or \
           TriggerFlags.L1PrescaleSet() == 'None':
        triggerPythonConfig.CTPInfo().random.rate1 = -7
        triggerPythonConfig.CTPInfo().random.rate2 = 1


    if no_Bphysics:
        
        BphysSig = TriggerFlags.BphysicsSlice.signatures()
        log.info('Listing Bphysics chains %s ' % BphysSig)
        
        if BphysSig is not None:
            for name,val in triggerPythonConfig.allChains.iteritems():
                if name in BphysSig and '_FS' in name:
                    
                    log.info('Chain with name %s will be inactive' % name)
                    val[0].prescale='-1'
                    val[1].prescale='-1'
コード例 #51
0
__version__="$Revision: 1.53 $"
__doc__="Flags for combined slices  "


_flags = [] 

class signatures(JobProperty):
    """ signatures in Combined slice """
    statusOn=True
    allowedTypes=['list']    
    StoredValue = []
    
_flags.append(signatures)

# create container
class CombinedSlice(JobPropertyContainer, CommonSliceHelper):
    """ Combined Slices Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(CombinedSlice)

for flag in _flags:
    TriggerFlags.CombinedSlice.add_JobProperty(flag)
del _flags

# make an alias
CombinedSliceFlags = TriggerFlags.CombinedSlice



コード例 #52
0
_flags = [] 
class signatures(JobProperty):
    """ signatures in Bjet slice """
    statusOn=True
    allowedTypes=['list']
    StoredValue   = []
    
_flags.append(signatures)



# create container
from TriggerMenu.menu.CommonSliceHelper import CommonSliceHelper

class BjetSlice(JobPropertyContainer, CommonSliceHelper):
    """ Bjet Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(BjetSlice)

# add add common slice flags
TriggerFlags.BjetSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.BjetSlice.add_JobProperty(flag)
del _flags

# make an alias
BjetSliceFlags = TriggerFlags.BjetSlice

コード例 #53
0
    StoredValue = False

_flags.append(OldStylePrescales)



class Lvl1(JobPropertyContainer):
    """ Lvl1 flags used in menu generation """




# execute

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(Lvl1)

for flag in _flags:
    TriggerFlags.Lvl1.add_JobProperty(flag)
del _flags



# make an alias
Lvl1Flags = TriggerFlags.Lvl1



#  LocalWords:  AllowedList

コード例 #54
0
_flags.append(doTrigEgammaRec)

class signatures(JobProperty):
    """ signatures in Egamma slice """
    statusOn=True
    allowedTypes=['list']
    StoredValue   = []

_flags.append(signatures)

# create container
class EgammaSlice(JobPropertyContainer, CommonSliceHelper):
    """ Egamma Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(EgammaSlice)

from TriggerMenu.menu.Lvl1Flags import Lvl1Flags

# add common slice flags
TriggerFlags.EgammaSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.EgammaSlice.add_JobProperty(flag)
del _flags

# make an alias
EgammaSliceFlags = TriggerFlags.EgammaSlice

コード例 #55
0
from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.outputLVL1configFile="outputLVL1config.xml"
TriggerFlags.outputHLTconfigFile="outputHLTconfig.xml"
TriggerFlags.readHLTconfigFromXML=False
TriggerFlags.readLVL1configFromXML=False
TriggerFlags.enableMonitoring = [ 'Time' ]

# Do not configure L1 simulation
TriggerFlags.doLVL1=False

#------------ This is for ATN/RTT tests only ---------
TriggerFlags.triggerMenuSetup = 'default'
if 'TriggerMenuSetup' in dir():
   if TriggerMenuSetup in TriggerFlags.triggerMenuSetup.allowedValues:
      TriggerFlags.triggerMenuSetup = TriggerMenuSetup
      log.info('Overwriting menu: %s' % TriggerFlags.triggerMenuSetup())
   else:
      # The "> Warning:" string is important to recognize this as build warning in NICOS
      log.error('--> Warning: Menu %s not available in this version of TriggerMenuPython. Skipping...' % TriggerMenuSetup)
      theApp.exit()

if 'L1PrescaleSet' in dir():
   TriggerFlags.L1PrescaleSet = L1PrescaleSet
if 'HLTPrescaleSet' in dir():
   TriggerFlags.HLTPrescaleSet = HLTPrescaleSet
if 'PrescaleSet' in dir():
   log.info('Prescaleset: %s' % PrescaleSet)
   if PrescaleSet == 'None':
      TriggerFlags.L1PrescaleSet = 'None'
      TriggerFlags.HLTPrescaleSet = 'None'
   elif PrescaleSet == '':
コード例 #56
0
#this is needed to get xml files from the release
nightlyPaths=os.environ['XMLPATH'].split(':')
for p in nightlyPaths:
    if os.path.exists(p+"/TriggerMenuXML/") is True:
        TriggerMenuXMLPath=p+"/TriggerMenuXML/"
        print "TriggerMenuXML directory is found in "+TriggerMenuXMLPath
        success = True
        break
    else:
        success = False

release  = sys.argv[2]
if release is '0':
    from TriggerJobOpts.TriggerFlags import TriggerFlags
    release=TriggerFlags.menuVersion()

#useDB = sys.argv[3]
if sys.argv[3] is "True":
    useDB=True
else:
    useDB=False
    
print 'DB status: ', useDB

menu_tag = 'Physics_pp_v2'
rate_file='TriggerCosts_1e33.xml'

lvl1_file=TriggerMenuXMLPath+'LVL1config_'+menu_tag+'_'+release+'.xml'
hlt_file=TriggerMenuXMLPath+'HLTconfig_'+menu_tag+'_'+release+'.xml'
コード例 #57
0
ファイル: Lumi.py プロジェクト: lawrenceleejr/TriggerStudies
def lumi(triggerPythonConfig):
    no_prescale = False
    no_Bphysics = False
    if 'no_prescale' in TriggerFlags.triggerMenuSetup(): no_prescale = True
    if 'no_Bphysics' in TriggerFlags.triggerMenuSetup(): no_Bphysics = True

    L1Prescales = {}
    HLTPrescales = {}
    streamConfig = {}
    
    menu_name = TriggerFlags.triggerMenuSetup()
    ## Do some aliasing here
    if menu_name == 'Physics_default': menu_name = 'Physics_pp_v4'
    elif menu_name == 'MC_loose_default': menu_name = 'MC_pp_v4_loose_mc_prescale'
    elif menu_name == 'MC_tight_default': menu_name = 'MC_pp_v4_tight_mc_prescale'
    elif menu_name == 'default_loose': menu_name = 'MC_pp_v4_loose_mc_prescale'
    elif menu_name == 'default_tight': menu_name = 'MC_pp_v4_tight_mc_prescale'

    log.info( 'Menu name: '+ menu_name)
    TriggerFlags.Lvl1.RemapThresholdsAsListed = True

    if menu_name.startswith('Physics_pp_v4') :
        log.info('MEOW in physics pp v4 menu setup')
        from TriggerMenu.menu.Physics_pp_v4 import setupMenu, Prescales, StreamConfig
        setupMenu()
        if 'cosmics_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_cosmics
            HLTPrescales = Prescales.HLTPrescales_cosmics
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales
        streamConfig = StreamConfig

    elif  menu_name.startswith('MC_pp_v4'):
        from TriggerMenu.menu.MC_pp_v4 import setupMenu, Prescales, StreamConfig
        setupMenu()
        streamConfig = StreamConfig
        if 'tight_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_tight_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_tight_mc_prescale
        elif 'loose_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_loose_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_loose_mc_prescale
            log.info(" HLTPrescales %s" % HLTPrescales)
        elif 'upgrade_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_upgrade_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_upgrade_mc_prescale            
            log.info(" HLTPrescales %s" % HLTPrescales)
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales

    elif menu_name.startswith('Physics_pp_v5') :
        log.info('MEOW in physics pp v5 menu setup')
        from TriggerMenu.menu.Physics_pp_v5 import setupMenu, Prescales, StreamConfig
        setupMenu()
        if 'cosmics_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_cosmics
            HLTPrescales = Prescales.HLTPrescales_cosmics
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales
        streamConfig = StreamConfig


    elif menu_name.startswith('DC14') :
        log.info('MEOW in DC14 menu setup')
        from TriggerMenu.menu.DC14 import setupMenu, Prescales, StreamConfig
        setupMenu()
        if 'tight_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_tight_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_tight_mc_prescale
        elif 'loose_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_loose_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_loose_mc_prescale
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales
        streamConfig = StreamConfig

    elif menu_name.startswith('LS1_v1') :
        log.info('MEOW in LS1_v1 menu setup')
        from TriggerMenu.menu.LS1_v1 import setupMenu, Prescales, StreamConfig
        setupMenu()
        if 'cosmics_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_cosmics
            HLTPrescales = Prescales.HLTPrescales_cosmics
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales
        streamConfig = StreamConfig

    elif  menu_name.startswith('MC_pp_v5'):
        from TriggerMenu.menu.MC_pp_v5 import setupMenu, Prescales, StreamConfig
        setupMenu()
        streamConfig = StreamConfig
        if 'tight_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_tight_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_tight_mc_prescale
        elif 'loose_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_loose_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_loose_mc_prescale
            log.info(" HLTPrescales %s" % HLTPrescales)
        elif 'no_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_no_prescale
            HLTPrescales = Prescales.HLTPrescales_no_prescale
            log.info(" HLTPrescales %s" % HLTPrescales)
        elif 'upgrade_mc_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_upgrade_mc_prescale
            HLTPrescales = Prescales.HLTPrescales_upgrade_mc_prescale            
            log.info(" HLTPrescales %s" %  HLTPrescales)
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales

    elif menu_name.startswith('Physics_HI_v3') :
        log.info('Physics_HI_v3 menu setup')
        from TriggerMenu.menu.Physics_HI_v3 import setupMenu, Prescales, StreamConfig
        setupMenu()
        streamConfig = StreamConfig            
        if 'cosmics_prescale' in menu_name:
            L1Prescales = Prescales.L1Prescales_cosmics
            HLTPrescales = Prescales.HLTPrescales_cosmics
        else:
            L1Prescales = Prescales.L1Prescales
            HLTPrescales = Prescales.HLTPrescales
            
    else:
        log.fatal ('Menu with name %s is not known in this version of TriggerMenu! ', menu_name)
        return
    #
    return (L1Prescales, HLTPrescales, streamConfig)
コード例 #58
0
from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer, jobproperties
from TriggerMenu.menu.CommonSliceHelper import AllowedList
from AthenaCommon.Logging import logging

log = logging.getLogger('TriggerMenu.L1TopoFlags.py')

_flags = [] 

class algos(JobProperty):
    """Names of algos enabled in the selected L1Topo menu"""
    statusOn=True
    allowedTypes=['list']
    StoredValue=[]

_flags.append(algos)  

class L1TopoTriggerFlags(JobPropertyContainer):
    """ L1Topo flags used in menu generation """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(L1TopoTriggerFlags)

for flag in _flags:
    TriggerFlags.L1TopoTriggerFlags.add_JobProperty(flag)
del _flags

# make an alias
L1TopoFlags = TriggerFlags.L1TopoTriggerFlags
            
コード例 #59
0
    
_flags.append(doTrackingApproach)

class signatures(JobProperty):
    """ signatures in Tau slice """
    statusOn=True
    allowedTypes = ['list', 'str']
    StoredValue = []

_flags.append(signatures)



# create container

class TauSlice(JobPropertyContainer, CommonSliceHelper):
    """ Tau Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(TauSlice)

# add add common slice flags
TriggerFlags.TauSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.TauSlice.add_JobProperty(flag)
del _flags

# make an alias
TauSliceFlags = TriggerFlags.TauSlice
コード例 #60
0
    allowedTypes=['list']

    StoredValue   = [
        ]


    
    
_flags.append(signatures)

# create container
class MinBiasSlice(JobPropertyContainer, CommonSliceHelper):
    """ MinBias Slice Flags """

from TriggerJobOpts.TriggerFlags import TriggerFlags
TriggerFlags.add_Container(MinBiasSlice)

# add add common slice flags
TriggerFlags.MinBiasSlice.import_JobProperties('TriggerMenu.menu.CommonSliceFlags')

for flag in _flags:
    TriggerFlags.MinBiasSlice.add_JobProperty(flag)
del _flags

# make an alias
MinBiasSliceFlags = TriggerFlags.MinBiasSlice

# add MinBias algs cuts as sub-container

#from TrigT2MinBias.TrigT2MinBiasProperties import TrigT2MinBiasProperties
#from TrigMinBias.TrigMinBiasProperties import TrigMinBiasProperties