ATLAS Offline Software
Loading...
Searching...
No Matches
run_Egamma1BDT_hypoMult.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3if __name__ == '__main__':
4
5 from AthenaCommon.Logging import logging
6 from AthenaCommon.Constants import DEBUG
7
8 from add_subsystems import add_subsystems
9
10 logger = logging.getLogger('run_Egamma1BDT_only')
11 logger.setLevel(DEBUG)
12
13
14 from AthenaConfiguration.AllConfigFlags import initConfigFlags
15 flags = initConfigFlags()
16 parser = flags.getArgumentParser()
17
18 parser.add_argument(
19 "-ifex",
20 "--doCaloInput",
21 action="store_true",
22 dest="doCaloInput",
23 help="Decoding L1Calo inputs",
24 default=False,
25 required=False)
26
27 args, _ = parser.parse_known_args()
28
29 from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags, defaultConditionsTags
30 # Default to the current data test file for Run-3
31 if not args.filesInput:
32 flags.Input.Files = defaultTestFiles.RAW_RUN3_DATA24
33 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
34 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_DATA24
35
36 flags.Output.AODFileName = 'AOD.pool.root'
37 flags.Concurrency.NumThreads = 1
38 flags.Concurrency.NumConcurrentEvents = 1
39 flags.Trigger.doLVL1 = True
40
41 flags.Scheduler.ShowDataDeps = True
42 flags.Scheduler.CheckDependencies = True
43 flags.Scheduler.ShowDataFlow = True
44 flags.Trigger.EDMVersion = 3
45 flags.Trigger.enableL1CaloPhase1 = True
46
47 flags.Debug.DumpEvtStore = True
48
49 flags.fillFromArgs(parser=parser)
50
51 # Enable only calo for this test
52 from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
53
54 setupDetectorFlags(flags, ['LAr','Tile','MBTS'], toggle_geometry=True)
55
56 flags.lock()
57 flags.dump()
58
59 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
60 acc = MainServicesCfg(flags)
61
62 from AthenaConfiguration.Enums import Format
63 if flags.Input.Format == Format.POOL:
64 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
65 acc.merge(PoolReadCfg(flags))
66
67 from TrigCaloRec.TrigCaloRecConfig import hltCaloCellSeedlessMakerCfg
68 acc.merge(hltCaloCellSeedlessMakerCfg(flags, roisKey=''))
69
70 else:
71 subsystems = ('eFex',)
72 acc.merge(add_subsystems(flags, subsystems, args, OutputLevel=DEBUG))
73
74 from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
75 acc.merge(ByteStreamReadCfg(flags))
76
77 from TrigCaloRec.TrigCaloRecConfig import hltCaloCellSeedlessMakerCfg
78 acc.merge(hltCaloCellSeedlessMakerCfg(flags, roisKey=''))
79
80 # add in the Algortihm to build a LArStrip Neighborhood container
81 from GlobalSimulation.Egamma1_LArStrip_FexCfg import (
82 Egamma1_LArStrip_FexCfg,
83 )
84 acc.merge(Egamma1_LArStrip_FexCfg(flags,
85 OutputLevel=DEBUG,
86 makeCaloCellContainerChecks=False,
87 dump=True,
88 dumpTerse=True))
89
90 # add in the EgammaBDT Algorithm to be run
91 from GlobalSimulation.GlobalSimAlgCfg_Egamma1BDT_hypoMult import GlobalSimulationAlgCfg
92 acc.merge(GlobalSimulationAlgCfg(flags,
93 OutputLevel=DEBUG,
94 dump=True))
95
96 if acc.run().isFailure():
97 import sys
98 sys.exit(1)
99
100