ATLAS Offline Software
TrigT1ZDCConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 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 
14  pn = flags.Input.ProjectName
15  year = int(pn.split('_')[0].split('data')[1])
16  if (year < 20):
17  acc.merge(ZdcRecRun2Cfg(flags))
18  acc.addEventAlgo(CompFactory.LVL1.TrigT1ZDC(filepath_LUT = flags.Trigger.ZdcLUT,
19  EnergyADCScale = 0.4))
20  else:
21  acc.merge(ZdcRecRun3Cfg(flags))
22  acc.addEventAlgo(CompFactory.LVL1.TrigT1Run3ZDC(filepath_LUT = 'TrigT1ZDC/zdc_json_PbPb5.36TeV_2024_TriggerSim.json',
23  MinSampleAna = 7,
24  MaxSampleAna = 15,
25  NegHG2ndDerivThresh = 45,
26  NegLG2ndDerivThresh = 15,
27  BaselineDelta = 3
28  )) #all EB runs > 462494 --> all use this LUT
29 
30  if flags.Output.doWriteESD or flags.Output.doWriteAOD:
31  acc.merge(ZdcRecOutputCfg(flags))
32 
33  return acc
34 
35 if __name__ == '__main__':
36  import sys
37  from AthenaConfiguration.AllConfigFlags import initConfigFlags
38  from AthenaConfiguration.TestDefaults import defaultGeometryTags
39 
40  flags = initConfigFlags()
41  #flags.Input.Files = ['/eos/user/m/mhoppesc/datasets/data23_hi/data23_hi.00462533.physics_EnhancedBias.merge.RAW._lb0680._SFO-17._0001.1']
42  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']
43  flags.Common.isOnline=False
44  flags.Exec.MaxEvents=100
45  flags.Concurrency.NumThreads = 1
46  flags.Concurrency.NumConcurrentEvents=1
47  flags.Scheduler.ShowDataDeps=True
48  flags.Scheduler.CheckDependencies=True
49  flags.Scheduler.ShowDataFlow=True
50  flags.Trigger.enableL1MuonPhase1=True
51  flags.Trigger.triggerMenuSetup='PhysicsP1_HI_run3_v1'
52  flags.Trigger.EDMVersion=3
53  flags.Trigger.doZDC=True
54  flags.Trigger.enableL1CaloPhase1 = False # FIXME: ATR-27095
55  flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN2
56  flags.fillFromArgs()
57  flags.lock()
58 
59 
60 
61  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
62  acc = MainServicesCfg(flags)
63 
64  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
65  acc.merge(ByteStreamReadCfg(flags))
66 
67  from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
68  generateL1Menu(flags)
69 
70  from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationCfg
71  acc.merge(Lvl1SimulationCfg(flags))
72  from AthenaCommon.Constants import DEBUG, INFO
73  acc.getEventAlgo("CTPSimulation").OutputLevel=INFO # noqa: ATL900
74  acc.getEventAlgo("LVL1::TrigT1ZDC").OutputLevel=DEBUG
75 
76 
77  acc.printConfig(withDetails=True, summariseProps=True, printDefaults=True)
78  with open("L1Sim.pkl", "wb") as p:
79  acc.store(p)
80  p.close()
81 
82  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:178
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:218
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
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:90
Trk::split
@ split
Definition: LayerMaterialProperties.h:38