5from AthenaCommon.Logging
import logging
7log = logging.getLogger(
"ZdcRecConfig")
10 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
11 acc = ComponentAccumulator()
13 from ZdcRec.ZdcRecConfig
import ZdcRecRun2Cfg, ZdcRecRun3Cfg, ZdcRecOutputCfg
14 from AthenaConfiguration.ComponentFactory
import CompFactory
15 from AthenaConfiguration.Enums
import LHCPeriod
17 if flags.GeoModel.Run
is LHCPeriod.Run2:
18 acc.merge(ZdcRecRun2Cfg(flags))
19 acc.addEventAlgo(CompFactory.LVL1.TrigT1Run2ZDC(filepath_LUT = flags.Trigger.ZdcLUT, EnergyADCScale = 0.4))
20 elif flags.GeoModel.Run
is LHCPeriod.Run3:
21 acc.merge(ZdcRecRun3Cfg(flags))
22 acc.addEventAlgo(CompFactory.LVL1.TrigT1Run3ZDC(filepath_LUT =
'TrigT1ZDC/zdc_json_PbPb5.36TeV_2024_TriggerSim.json',
25 NegHG2ndDerivThresh = 45,
26 NegLG2ndDerivThresh = 15,
30 log.error(f
'L1ZDCSimCfg: Unsupported LHCPeriod: {flags.GeoModel.Run}')
32 if flags.Output.doWriteESD
or flags.Output.doWriteAOD:
33 acc.merge(ZdcRecOutputCfg(flags))
37if __name__ ==
'__main__':
39 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
40 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
42 flags = initConfigFlags()
44 flags.Input.Files = [
'/eos/atlas/atlascerngroupdisk/phys-hi/trig-heavyion/data18_hi.00367273.physics_EnhancedBias.merge.RAW/data18_hi.00367273.physics_EnhancedBias.merge.RAW._lb0251._SFO-7._0002.1']
45 flags.Common.isOnline=
False
46 flags.Exec.MaxEvents=100
47 flags.Concurrency.NumThreads = 1
48 flags.Concurrency.NumConcurrentEvents=1
49 flags.Scheduler.ShowDataDeps=
True
50 flags.Scheduler.CheckDependencies=
True
51 flags.Scheduler.ShowDataFlow=
True
52 flags.Trigger.enableL1MuonPhase1=
True
53 flags.Trigger.triggerMenuSetup=
'PhysicsP1_HI_run3_v1'
54 flags.Trigger.EDMVersion=3
55 flags.Trigger.doZDC=
True
56 flags.Trigger.enableL1CaloPhase1 =
False
57 flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN2
63 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
64 acc = MainServicesCfg(flags)
66 from TriggerJobOpts.TriggerByteStreamConfig
import ByteStreamReadCfg
67 acc.merge(ByteStreamReadCfg(flags))
69 from TrigConfigSvc.TrigConfigSvcCfg
import generateL1Menu
72 from TriggerJobOpts.Lvl1SimulationConfig
import Lvl1SimulationCfg
73 acc.merge(Lvl1SimulationCfg(flags))
75 acc.printConfig(withDetails=
True, summariseProps=
True, printDefaults=
True)
76 with open(
"L1Sim.pkl",
"wb")
as p:
80 sys.exit(acc.run().isFailure())