Ejemplo n.º 1
0
def moveEDAlg(seq):
    from AthenaCommon.AlgSequence import AlgSequence

    topSequence = AlgSequence()
    edalg = topSequence.EventEtDensityTester  # get the old density calculation alg
    topSequence.remove(edalg)  # remove it from topsequence
    seq += edalg  # readd it to DerivationFrameworkJob)))
Ejemplo n.º 2
0
def removeFromTopSequence(alg):
    "removeFromTopSequence( alg ) --> remove alg from TopSequence"
    from AthenaCommon.AlgSequence import AlgSequence
    topSequence = AlgSequence()
    if alg in topSequence:
        print("Removing Algorithm %s from topSequence." % alg.getName())
        # If this doesnt work, change by alg.getName()
        topSequence.remove(alg)
Ejemplo n.º 3
0
def postponeEgammaLock(ringerAlg):
    "Postpone egamma locker tool to execute after the last tool on toolList"
    from AthenaCommon.AlgSequence import AlgSequence, dumpSequence
    topSequence = AlgSequence()
    from egammaRec.egammaLocker import egammaLocker
    # Make sure we add it before streams:
    foundRingerAlg = False
    foundEgammaLocker = False
    for pos, alg in enumerate(topSequence):
        if ringerAlg.getName() == alg.getName():
            foundRingerAlg = True
            ringerPos = pos
        if 'egLocker' == alg.getName():
            egammaLockerPos = pos
            egammaLockerAlg = alg
            foundEgammaLocker = True
        if foundRingerAlg and foundEgammaLocker:
            if ringerPos > egammaLockerPos:
                topSequence.remove(egammaLockerAlg)
                topSequence.insert(ringerPos, egammaLockerAlg)
            break
    else:
        mlog.debug("Couldn't find egammaLocker or RingerAlg.")
Ejemplo n.º 4
0
        except Exception:
            treatException("Problem with EMTopoCluster. Switched off")
            jobproperties.CaloRecFlags.doCaloTopoCluster = False

#Run egamma
pdr.flag_domain('egamma')
if rec.doEgamma(): protectedInclude("egammaRec/egammaRec_jobOptions.py")
from AODFix.AODFix import AODFix_postEgammaRec
AODFix_postEgammaRec()

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

if hasattr(topSequence, "EDtpIsoCentralAlg"):
    EDtpIsoCentralAlg = getattr(topSequence, "EDtpIsoCentralAlg")
    topSequence.remove(EDtpIsoCentralAlg)
    topSequence += EDtpIsoCentralAlg

if hasattr(topSequence, "EDtpIsoForwardAlg"):
    EDtpIsoForwardAlg = getattr(topSequence, "EDtpIsoForwardAlg")
    topSequence.remove(EDtpIsoForwardAlg)
    topSequence += EDtpIsoForwardAlg

if hasattr(topSequence, "IsolationBuilder"):
    iso = getattr(topSequence, "IsolationBuilder")
    topSequence.remove(iso)
    iso.EgIsoTypes = iso.MuIsoTypes
    iso.CellCollectionName = 'SubtractedCells'
    topSequence += iso
Ejemplo n.º 5
0
from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc
LVL1ConfigSvc = LVL1ConfigSvc("LVL1ConfigSvc")
LVL1ConfigSvc.XMLFile = TriggerFlags.inputLVL1configFile()
#LVL1ConfigSvc.CreateLegacyObjects=True

include("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py")
include("TrigT1CaloSim/TrigT1CaloSimJobOptions.py")

print "JOERG after including T1Calo simulation"
print topSequence.getChildren()

toRemove = [
    c for c in topSequence.getChildren() if c.name() == 'TriggerTowerMaker'
]
for x in toRemove:
    topSequence.remove(x)

print "JOERG after removing TriggerTowerMaker"
print topSequence.getChildren()

from TrigT1MBTS.TrigT1MBTSConf import LVL1__TrigT1MBTS
topSequence += LVL1__TrigT1MBTS()

from TrigT1BCM.TrigT1BCMConf import LVL1__TrigT1BCM
topSequence += LVL1__TrigT1BCM()

from TrigT1Lucid.TrigT1LucidConf import LVL1__TrigT1Lucid
topSequence += LVL1__TrigT1Lucid()

from TrigT1Muctpi.TrigT1MuctpiConfig import L1Muctpi_on_RDO
topSequence += L1Muctpi_on_RDO()
Ejemplo n.º 6
0
def moveEDAlg(seq):
    from AthenaCommon.AlgSequence import AlgSequence
    topSequence = AlgSequence()
    edalg = topSequence.EventEtDensityTester  # get the old density calculation alg
    topSequence.remove(edalg)  # remove it from topsequence
    seq += edalg  # readd it to DerivationFrameworkJob)))
Ejemplo n.º 7
0
decodingSeq += decoder
decodingSeq += deserialiser
topSequence += decodingSeq

# Configure output file name
outputFileName = 'ESD.pool.root' if HLTModuleID == 0 else 'ESD.Module{:d}.pool.root'.format(
    HLTModuleID)
athenaCommonFlags.PoolESDOutput = outputFileName
ConfigFlags.Output.ESDFileName = outputFileName

# Create OutputStream for ESD writing
from OutputStreamAthenaPool.CreateOutputStreams import createOutputStream

StreamESD = createOutputStream("StreamESD", ConfigFlags.Output.ESDFileName,
                               True)
topSequence.remove(StreamESD)
outSequence.remove(StreamESD)

# Define what to write into ESD
from TriggerJobOpts.TriggerFlags import TriggerFlags
from TrigEDMConfig.TriggerEDM import getTriggerEDMList

TriggerFlags.EDMDecodingVersion = 3  # currently hard-coded
edmList = getTriggerEDMList(TriggerFlags.ESDEDMSet(),
                            TriggerFlags.EDMDecodingVersion())
if len(ItemList) == 0:
    for edmType, edmKeys in six.iteritems(edmList):
        for key in edmKeys:
            ItemList.append(edmType + '#' + key)
    ItemList += [
        "xAOD::EventInfo#EventInfo", "xAOD::EventAuxInfo#EventInfoAux."
Ejemplo n.º 8
0
doWriteBS = False
include("TriggerJobOpts/runHLT_standalone.py")

from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

doHLTCaloTopo=True
doL2Egamma=True

# ----------------------------------------------------------------
# Setup Views
# ----------------------------------------------------------------
from AthenaCommon.CFElements import stepSeq,seqOR,findAlgorithm
from DecisionHandling.DecisionHandlingConf import RoRSeqFilter

topSequence.remove( findAlgorithm(topSequence, "L1Decoder") )
from L1Decoder.L1DecoderConf import L1TestDecoder
topSequence += L1TestDecoder("L1TestDecoder", OutputLevel=DEBUG)

steps = seqOR("HLTTop")
topSequence += steps

if TriggerFlags.doCalo:
  if ( doHLTCaloTopo ) :
    from TrigT2CaloCommon.CaloDef import HLTFSTopoRecoSequence
    recosequence, caloclusters = HLTFSTopoRecoSequence("HLT_TestFSRoI")
    steps += recosequence

  if ( doL2Egamma ) :
     from TrigT2CaloCommon.CaloDef import createFastCaloSequence
     filterL1RoIsAlg = RoRSeqFilter( "filterL1RoIsAlg")