Skip to content
Snippets Groups Projects
Commit 85de033c authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh Committed by Adam Edward Barton
Browse files

Steps towards setting up the L1 simulation with new configuration

parent a65a4963
No related branches found
No related tags found
No related merge requests found
Showing
with 92 additions and 33 deletions
......@@ -186,8 +186,8 @@ def TrigServicesCfg(flags):
from TrigOutputHandling.TrigOutputHandlingConfig import HLTResultMTMakerCfg
loop_mgr.ResultMaker = HLTResultMTMakerCfg()
from TrigByteStreamCnvSvc.TrigByteStreamConfig import TrigByteStreamCfg
acc.merge(TrigByteStreamCfg(flags))
from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
acc.merge(ByteStreamReadCfg(flags))
loop_mgr.EvtSel = acc.getService('EventSelectorByteStream')
loop_mgr.OutputCnvSvc = acc.getService('ByteStreamCnvSvc')
......
......@@ -25,3 +25,7 @@ atlas_add_component( L1CaloFEXSim
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
atlas_install_runtime( share/*.csv )
atlas_add_test( L1CaloFEXSimCfg
SCRIPT python -m L1CaloFEXSim.L1CaloFEXSimCfg
POST_EXEC_SCRIPT nopost.sh )
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
def L1CaloFEXSimCfg(flags):
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
acc = ComponentAccumulator()
from TrigT1CaloFexPerf.L1PerfControlFlags import L1Phase1PerfFlags as simflags
if flags.Input.isMC:
SCellType = "SCell"
else:
SCellType = simflags.Calo.SCellType()
eFEX = CompFactory.LVL1.eFEXDriver('eFEXDriver',
SCell=SCellType )
eFEX.eSuperCellTowerMapperTool.SCell=SCellType
eFEX.eFEXSysSimTool.SCell=SCellType
acc.addEventAlgo(eFEX)
# jFEX part
jFEX = CompFactory.LVL1.jFEXDriver('jFEXDriver',
SCell=SCellType )
jFEX.jSuperCellTowerMapperTool.SCell=SCellType
jFEX.jFEXSysSimTool.SCell=SCellType
acc.addEventAlgo(jFEX)
gFEX = CompFactory.LVL1.gFEXDriver('gFEXDriver',
SCell=SCellType )
gFEX.gSuperCellTowerMapperTool.SCell=SCellType
gFEX.gFEXSysSimTool.SCell=SCellType
acc.addEventAlgo(gFEX)
return acc
if __name__ == '__main__':
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior = 1
from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
flags.Input.Files = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.digit.RDO.e4993_s3214_d1697_tid26494053_00/RDO.26494053._000001.pool.root.1']
flags.Common.isOnline=False
flags.Exec.MaxEvents=25
flags.Concurrency.NumThreads = 1
flags.Concurrency.NumConcurrentEvents=1
flags.Scheduler.ShowDataDeps=True
flags.Scheduler.CheckDependencies=True
flags.Scheduler.ShowDataFlow=True
flags.Trigger.enableL1MuonPhase1=True
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
acc = MainServicesCfg(flags)
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
acc.merge(PoolReadCfg(flags))
from TrigT1CaloSim.TrigT1CaloSimRun2Config import L1CaloLegacySimCfg
acc.merge(L1CaloLegacySimCfg(flags))
acc.merge(L1CaloFEXSimCfg(flags))
with open("L1Sim.pkl", "wb") as p:
acc.store(p)
p.close()
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from L1CaloFEXSim.L1CaloFEXSimConf import LVL1__eFEXDriver
class Run3eFEXDriver (LVL1__eFEXDriver):
__slots__ = []
def __init__(self, name):
print("GONDOR CALLS FOR AID")
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from L1CaloFEXSim.L1CaloFEXSimConf import LVL1__gFEXDriver
class Run3gFEXDriver (LVL1__gFEXDriver):
__slots__ = []
def __init__(self, name):
print("GONDOR CALLS FOR AID")
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from L1CaloFEXSim.L1CaloFEXSimConf import LVL1__jFEXDriver
class Run3jFEXDriver (LVL1__jFEXDriver):
__slots__ = []
def __init__(self, name):
print("GONDOR CALLS FOR MORE AID")
......@@ -62,7 +62,7 @@ def Run2TriggerTowerMakerCfg(flags, name):
def L1LegacyCaloSimCfg(flags):
def L1CaloLegacySimCfg(flags):
'''
Configures Legacy 1 calo in new JO style
'''
......@@ -159,7 +159,7 @@ if __name__ == '__main__':
from AthenaCommon.CFElements import seqAND
acc.addSequence(seqAND('L1CaloLegacySimSeq'), parentName='AthAlgSeq')
acc.merge(L1LegacyCaloSimCfg(flags), sequenceName='L1CaloLegacySimSeq')
acc.merge(L1CaloLegacySimCfg(flags), sequenceName='L1CaloLegacySimSeq')
acc.printConfig(withDetails=True, summariseProps=True, printDefaults=True)
with open("L1CaloSim.pkl", "wb") as p:
......
......@@ -6,7 +6,7 @@ from IOVDbSvc.IOVDbSvcConfig import addFolders
def _TileMuonReceiverDecision(flags):
acc = ComponentAccumulator()
from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
acc.merge(ByteStreamReadCfg(flags, ["TileRawChannelContainer/MuRcvRawChCnt"]))
TileMuonReceiverDecision = CompFactory.TileMuonReceiverDecision('TileMuonReceiverDecision'
, TileRawChannelContainer = "MuRcvRawChCnt" # input
......
......@@ -190,20 +190,28 @@ def Lvl1SimulationSequence( ConfigFlags ):
l1SimSeq += [subSystemSimSeq]
return l1SimSeq
def Lvl1SimulationCfg(flags):
def Lvl1SimulationCfg(flags, seqName = None):
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
acc = ComponentAccumulator()
if seqName:
from AthenaCommon.CFElements import parOR
acc = ComponentAccumulator(sequence=parOR(seqName))
else:
acc = ComponentAccumulator()
from AthenaCommon.CFElements import seqAND
acc.addSequence(seqAND('L1SimSeq'), parentName='AthAlgSeq')
acc.addSequence(seqAND('L1SimSeq'))
acc.addSequence(seqAND('L1CaloLegacySimSeq'), parentName='L1SimSeq')
from TrigT1CaloSim.TrigT1CaloSimRun2Config import L1LegacyCaloSimCfg
acc.merge(L1LegacyCaloSimCfg(flags), sequenceName='L1CaloLegacySimSeq')
from TrigT1CaloSim.TrigT1CaloSimRun2Config import L1CaloLegacySimCfg
acc.merge(L1CaloLegacySimCfg(flags), sequenceName='L1CaloLegacySimSeq')
acc.addSequence(seqAND('L1MuonLegacySimSeq'), parentName='L1SimSeq')
#acc.addSequence(seqAND('L1CaloSimSeq'), parentName='L1SimSeq')
#from TrigT1CaloSim.TrigT1CaloSimRun2Config import L1CaloSimCfg
#acc.merge(L1CaloSimCfg(flags), sequenceName='L1CaloSimSeq')
acc.addSequence(seqAND('L1MuonSimSeq'), parentName='L1SimSeq')
from TriggerJobOpts.Lvl1MuonSimulationConfig import Lvl1MuonSimulationCfg
acc.merge(Lvl1MuonSimulationCfg(flags), sequenceName='L1MuonLegacySimSeq')
acc.merge(Lvl1MuonSimulationCfg(flags), sequenceName='L1MuonSimSeq')
acc.addSequence(seqAND('L1LegacyTopoSimSeq'), parentName='L1SimSeq')
from L1TopoSimulation.L1TopoSimulationConfig import L1LegacyTopoSimulationCfg
......
......@@ -158,6 +158,7 @@ else: # athenaHLT
_run_number = af.run_number[0]
TriggerJobOpts.Modifiers._run_number = _run_number # noqa, set by athenaHLT
ConfigFlags.Input.RunNumber = [_run_number]
from RecExConfig.RecFlags import rec
rec.RunNumber =_run_number
......@@ -438,6 +439,8 @@ log = logging.getLogger('runHLT_standalone.py')
# ----------------------------------------------------------------
# Pool input
# ----------------------------------------------------------------
print("ConfigFlags.Input.Format", ConfigFlags.Input.Format)
print("ConfigFlags.Trigger.Online.isPartition", ConfigFlags.Trigger.Online.isPartition)
if ConfigFlags.Input.Format == 'POOL':
import AthenaPoolCnvSvc.ReadAthenaPool # noqa
svcMgr.AthenaPoolCnvSvc.PoolAttributes = [ "DEFAULT_BUFFERSIZE = '2048'" ]
......@@ -487,6 +490,8 @@ LumiBlockMuWriterDefault(sequence=hltBeginSeq)
if opt.doL1Sim:
from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
hltBeginSeq += Lvl1SimulationSequence(ConfigFlags)
#from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationCfg
#CAtoGlobalWrapper(Lvl1SimulationCfg, ConfigFlags, seqName="HLTBeginSeq")
# ---------------------------------------------------------------
# Add HLTSeeding providing inputs to HLT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment