ATLAS Offline Software
run_firstChain.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 if __name__ == '__main__':
4 
5  from AthenaCommon.Logging import logging
6  from AthenaCommon.Constants import DEBUG
7 
8  logger = logging.getLogger('run_firstChain')
9  logger.setLevel(DEBUG)
10 
11  from AthenaConfiguration.AllConfigFlags import initConfigFlags
12  flags = initConfigFlags()
13  parser = flags.getArgumentParser()
14 
15  args, _ = parser.parse_known_args()
16 
17  from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags, defaultConditionsTags
18  # Default to the current data test file for Run-3
19  if not args.filesInput:
20  flags.Input.Files = defaultTestFiles.RAW_RUN3_DATA24
21  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
22  flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA24
23 
24  flags.Output.AODFileName = 'AOD.pool.root'
25  flags.Concurrency.NumThreads = 1
26  flags.Concurrency.NumConcurrentEvents = 1
27  flags.Trigger.doLVL1 = True
28 
29  flags.Scheduler.ShowDataDeps = True
30  flags.Scheduler.CheckDependencies = True
31  flags.Scheduler.ShowDataFlow = True
32  flags.Trigger.EDMVersion = 3
33  flags.Trigger.enableL1CaloPhase1 = True
34  flags.Trigger.triggerConfig='FILE'
35 
36  flags.fillFromArgs(parser=parser)
37 
38  from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
39  setupDetectorFlags(flags, ['LAr','Tile','MBTS'], toggle_geometry=True)
40 
41  flags.lock()
42  flags.dump()
43 
44 
47  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
48  acc = MainServicesCfg(flags)
49 
50  # Generate run3 L1 menu
51  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg, generateL1Menu
52  acc.merge(L1ConfigSvcCfg(flags))
53  generateL1Menu(flags)
54 
55  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
56  acc.merge(PoolReadCfg(flags))
57 
58  from TrigCaloRec.TrigCaloRecConfig import hltCaloCellSeedlessMakerCfg
59  acc.merge(hltCaloCellSeedlessMakerCfg(flags, roisKey=''))
60 
61  from AthenaConfiguration.Enums import Format
62  if flags.Input.Format == Format.POOL:
63  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
64  acc.merge(PoolReadCfg(flags))
65  else:
66  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
67  acc.merge(ByteStreamReadCfg(flags))
68 
69  # Add TopoClusterConfig to build calo conditions correctly
70  from CaloRec.CaloTopoClusterConfig import CaloTopoClusterCfg
71  caloconditions = CaloTopoClusterCfg(flags)
72  acc.merge(caloconditions)
73 
74  gepAlgs_output_level = DEBUG
75 
76  # Add algorithm to prepare LAr cells for Global
77  from GlobalSimulation.LArCellPreparationAlgCfg import LArCellPreparationAlgCfg
78  gblLArCellContainerKey = "GlobalLArCells"
79  acc.merge(LArCellPreparationAlgCfg(flags,
80  NumberOfEnergyBits = 6,
81  ValueLeastSignificantBit = 40,
82  ValueGainFactor = 4,
83  gblLArCellsKey = gblLArCellContainerKey,
84  OutputLevel=DEBUG))
85 
86  # Add algorithm to simulate MUX input/output for LAr cells
87  from GlobalSimulation.LArCellMuxAlgCfg import LArCellMuxAlgCfg
88  acc.merge(LArCellMuxAlgCfg(flags,
89  gblLArCellsKey = gblLArCellContainerKey,
90  writeMuxInputBitstreamToFile = True,
91  writeMuxOutputBitstreamToFile = True,
92  OutputLevel=DEBUG))
93 
94  # Algorithm to build cell towers
95  from GlobalSimulation.GlobalCellTowerAlgToolCfg import GlobalCellTowerAlgToolCfg
96  acc.merge(GlobalCellTowerAlgToolCfg(flags,
97  gblLArCellsKey = gblLArCellContainerKey,
98  gblCellTowersKey = "GlobalCellTowers",
99  OutputLevel=DEBUG))
100 
101  if acc.run().isFailure():
102  import sys
103  sys.exit(1)
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:225
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:310
TrigCaloRecConfig.hltCaloCellSeedlessMakerCfg
def hltCaloCellSeedlessMakerCfg(flags, roisKey='UNSPECIFIED', sequenceName=None)
Definition: TrigCaloRecConfig.py:104
Constants
some useful constants -------------------------------------------------—
LArCellMuxAlgCfg
Definition: LArCellMuxAlgCfg.py:1
python.CaloTopoClusterConfig.CaloTopoClusterCfg
def CaloTopoClusterCfg(flags, cellsname="AllCalo", clustersname=None, clustersnapname="CaloTopoClusters")
Definition: CaloTopoClusterConfig.py:318
python.DetectorConfigFlags.setupDetectorFlags
def setupDetectorFlags(flags, custom_list=None, use_metadata=False, toggle_geometry=False, validate_only=False, keep_beampipe=False)
Definition: DetectorConfigFlags.py:292
GlobalCellTowerAlgToolCfg
Definition: GlobalCellTowerAlgToolCfg.py:1
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:239
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:71
LArCellPreparationAlgCfg
Definition: LArCellPreparationAlgCfg.py:1