ATLAS Offline Software
Lvl1SimulationConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 
6 
7 
8 def Lvl1SimulationCfg(flags, seqName = None):
9  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10  if seqName:
11  from AthenaCommon.CFElements import parOR
12  acc = ComponentAccumulator(sequence=parOR(seqName))
13  else:
14  acc = ComponentAccumulator()
15 
16  from AthenaCommon.CFElements import seqAND
17  acc.addSequence(seqAND('L1SimSeq'))
18 
19  if flags.Trigger.enableL1CaloLegacy:
20  acc.addSequence(seqAND('L1CaloLegacySimSeq'), parentName='L1SimSeq')
21  from TrigT1CaloSim.TrigT1CaloSimRun2Config import L1CaloLegacySimCfg
22  acc.merge(L1CaloLegacySimCfg(flags), sequenceName='L1CaloLegacySimSeq')
23 
24  acc.addSequence(seqAND('L1CaloSimSeq'), parentName='L1SimSeq')
25 
26  if flags.Trigger.enableL1CaloPhase1:
27  from L1CaloFEXSim.L1CaloFEXSimCfg import L1CaloFEXSimCfg
28  acc.merge(L1CaloFEXSimCfg(flags), sequenceName = 'L1CaloSimSeq')
29 
30 
31  if flags.Trigger.enableL1MuonPhase1:
32  acc.addSequence(seqAND('L1MuonSimSeq'), parentName='L1SimSeq')
33  from TriggerJobOpts.Lvl1MuonSimulationConfig import Lvl1MuonSimulationCfg
34  acc.merge(Lvl1MuonSimulationCfg(flags), sequenceName='L1MuonSimSeq')
35 
36  if flags.Trigger.L1.doTopo:
37  acc.addSequence(seqAND('L1TopoSimSeq'), parentName='L1SimSeq')
38  from L1TopoSimulation.L1TopoSimulationConfig import L1TopoSimulationCfg
39  acc.merge(L1TopoSimulationCfg(flags), sequenceName='L1TopoSimSeq')
40 
41  if flags.Trigger.enableL1CaloLegacy:
42  acc.addSequence(seqAND('L1LegacyTopoSimSeq'), parentName='L1SimSeq')
43  from L1TopoSimulation.L1TopoSimulationConfig import L1LegacyTopoSimulationCfg
44  acc.merge(L1LegacyTopoSimulationCfg(flags), sequenceName='L1LegacyTopoSimSeq')
45 
46  if flags.Trigger.doZDC:
47  acc.addSequence(seqAND('L1ZDCSimSeq'),parentName='L1SimSeq')
48  from TrigT1ZDC.TrigT1ZDCConfig import L1ZDCSimCfg
49  acc.merge(L1ZDCSimCfg(flags), sequenceName = 'L1ZDCSimSeq')
50 
51  if flags.Trigger.doTRT:
52  acc.addSequence(seqAND('L1TRTSimSeq'),parentName='L1SimSeq')
53  from TrigT1TRT.TrigT1TRTConfig import L1TRTSimCfg
54  acc.merge(L1TRTSimCfg(flags), sequenceName = 'L1TRTSimSeq')
55 
56 
57  acc.addSequence(seqAND('L1CTPSimSeq'), parentName='L1SimSeq')
58  from TrigT1CTP.CTPSimulationConfig import CTPSimulationCfg
59  acc.merge(CTPSimulationCfg(flags), sequenceName="L1CTPSimSeq")
60 
61 
62  return acc
63 
64 if __name__ == '__main__':
65  import sys
66  from AthenaConfiguration.AllConfigFlags import initConfigFlags
67 
68  flags = initConfigFlags()
69  flags.Input.Files = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.RDO.e8514_e8528_s4159_s4114_r14799_tid34171421_00/RDO.34171421._000011.pool.root.1']
70  flags.Exec.MaxEvents = 5
71  flags.Concurrency.NumThreads = 1
72  flags.Trigger.triggerMenuSetup = 'Dev_pp_run3_v1'
73  flags.IOVDb.GlobalTag="OFLCOND-MC23-SDR-RUN3-05" # temporary override until the input RDO is updated to a MC23e setup
74  flags.Trigger.doHLT = True # this is necessary so that the simulation of L1Calo (if running on MC) gets output with keys that Topo sim expects
75  flags.fillFromArgs()
76  flags.lock()
77 
78  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
79  acc = MainServicesCfg(flags)
80 
81  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
82  acc.merge(PoolReadCfg(flags))
83 
84  from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
85  generateL1Menu(flags)
86 
87  acc.merge(Lvl1SimulationCfg(flags))
88 
89  acc.printConfig(withDetails=True, summariseProps=True, printDefaults=True)
90  sys.exit(acc.run().isFailure())
TrigT1ZDCConfig.L1ZDCSimCfg
def L1ZDCSimCfg(flags)
this function sets up the L1 simulation sequence with the ZDC it covers the case of rerunning the L1 ...
Definition: TrigT1ZDCConfig.py:6
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
L1TopoSimulationConfig.L1TopoSimulationCfg
def L1TopoSimulationCfg(flags, doMonitoring=True, readMuCTPI=False, name="L1TopoSimulation")
Definition: L1TopoSimulationConfig.py:47
python.Lvl1SimulationConfig.Lvl1SimulationCfg
def Lvl1SimulationCfg(flags, seqName=None)
this function sets up the top L1 simulation sequence
Definition: Lvl1SimulationConfig.py:8
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:184
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
TrigT1CaloSimRun2Config.L1CaloLegacySimCfg
def L1CaloLegacySimCfg(flags)
Definition: TrigT1CaloSimRun2Config.py:117
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:271
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
TrigT1TRTConfig.L1TRTSimCfg
def L1TRTSimCfg(flags, name="TrigT1TRT")
this function sets up the L1 simulation sequence with the TRT it covers the case of rerunning the L1 ...
Definition: TrigT1TRTConfig.py:6
python.Lvl1MuonSimulationConfig.Lvl1MuonSimulationCfg
def Lvl1MuonSimulationCfg(flags)
Definition: Lvl1MuonSimulationConfig.py:397
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.CTPSimulationConfig.CTPSimulationCfg
def CTPSimulationCfg(flags)
Definition: CTPSimulationConfig.py:6
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
L1TopoSimulationConfig.L1LegacyTopoSimulationCfg
def L1LegacyTopoSimulationCfg(flags)
Definition: L1TopoSimulationConfig.py:8
L1CaloFEXSimCfg
Definition: L1CaloFEXSimCfg.py:1