ATLAS Offline Software
TrigT1ZDCConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
4 
5 
6 def L1ZDCSimCfg(flags):
7  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
9 
10  from ZdcRec.ZdcRecConfig import ZdcRecRun2Cfg, ZdcRecRun3Cfg,ZdcRecOutputCfg
11  from AthenaConfiguration.ComponentFactory import CompFactory
12 
13  pn = flags.Input.ProjectName
14  year = int(pn.split('_')[0].split('data')[1])
15  if (year < 20):
16  acc.merge(ZdcRecRun2Cfg(flags))
17  acc.addEventAlgo(CompFactory.LVL1.TrigT1ZDC(filepath_LUT = flags.Trigger.ZdcLUT,
18  EnergyADCScale = 0.4))
19  else:
20  acc.merge(ZdcRecRun3Cfg(flags))
21  acc.addEventAlgo(CompFactory.LVL1.TrigT1ZDC(filepath_LUT = 'TrigT1ZDC/zdc_json_PbPb5.36TeV_2023.json',
22  EnergyADCScale = 0)) #all EB runs > 462494 --> all use this LUT
23 
24  if flags.Output.doWriteESD or flags.Output.doWriteAOD:
25  acc.merge(ZdcRecOutputCfg(flags))
26 
27  return acc
28 
29 if __name__ == '__main__':
30  import sys
31  from AthenaConfiguration.AllConfigFlags import initConfigFlags
32 
33  flags = initConfigFlags()
34  flags.Input.Files = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data15_hi.00287843.physics_EnhancedBias.merge.RAW._lb0226._SFO-2._0001.1']
35  flags.Common.isOnline=False
36  flags.Exec.MaxEvents=100
37  flags.Concurrency.NumThreads = 1
38  flags.Concurrency.NumConcurrentEvents=1
39  flags.Scheduler.ShowDataDeps=True
40  flags.Scheduler.CheckDependencies=True
41  flags.Scheduler.ShowDataFlow=True
42  flags.Trigger.enableL1MuonPhase1=True
43  flags.Trigger.triggerMenuSetup='Dev_HI_run3_v1'
44  flags.Trigger.EDMVersion=3
45  flags.Trigger.doZDC=True
46  flags.Trigger.enableL1CaloPhase1 = False # FIXME: ATR-27095
47  flags.fillFromArgs()
48  flags.lock()
49 
50 
51 
52  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
53  acc = MainServicesCfg(flags)
54 
55  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
56  acc.merge(ByteStreamReadCfg(flags))
57 
58  from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
59  generateL1Menu(flags)
60 
61  from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationCfg
62  acc.merge(Lvl1SimulationCfg(flags))
63  from AthenaCommon.Constants import DEBUG, INFO
64  acc.getEventAlgo("CTPSimulation").OutputLevel=INFO # noqa: ATL900
65  acc.getEventAlgo("LVL1::TrigT1ZDC").OutputLevel=DEBUG
66 
67 
68  acc.printConfig(withDetails=True, summariseProps=True, printDefaults=True)
69  with open("L1Sim.pkl", "wb") as p:
70  acc.store(p)
71  p.close()
72 
73  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
python.Lvl1SimulationConfig.Lvl1SimulationCfg
def Lvl1SimulationCfg(flags, seqName=None)
this function sets up the top L1 simulation sequence
Definition: Lvl1SimulationConfig.py:8
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.ZdcRecConfig.ZdcRecRun2Cfg
def ZdcRecRun2Cfg(flags)
Definition: ZdcRecConfig.py:89
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:184
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
python.ZdcRecConfig.ZdcRecRun3Cfg
def ZdcRecRun3Cfg(flags)
Definition: ZdcRecConfig.py:129
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
Constants
some useful constants -------------------------------------------------—
Trk::open
@ open
Definition: BinningType.h:40
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.ZdcRecConfig.ZdcRecOutputCfg
def ZdcRecOutputCfg(flags)
Definition: ZdcRecConfig.py:21
Trk::split
@ split
Definition: LayerMaterialProperties.h:38