ATLAS Offline Software
run_invMassDPhiInc2.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 
4 import os
5 
6 if __name__ == '__main__':
7 
8  from AthenaCommon.Logging import logging
9  from AthenaCommon.Constants import DEBUG
10 
11  logger = logging.getLogger('run_nodata')
12  logger.setLevel(DEBUG)
13 
14 
15  import argparse
16  from argparse import RawTextHelpFormatter
17 
18 
19  parser = argparse.ArgumentParser(
20  "Running UCL hypo block",
21  formatter_class=RawTextHelpFormatter)
22 
23 
24  parser.add_argument(
25  "-n",
26  "--nevent",
27  type=int,
28  action="store",
29  dest="nevent",
30  help="Maximum number of events will be executed.",
31  default=0,
32  required=False)
33 
34  parser.add_argument(
35  "-s",
36  "--skipEvents",
37  type=int,
38  action="store",
39  dest="skipEvents",
40  help="Number of events to skip.",
41  default=0,
42  required=False)
43 
44 
45  parser.add_argument(
46  "-ifex",
47  "--doCaloInput",
48  action="store_true",
49  dest="doCaloInput",
50  help="Decoding L1Calo inputs",
51  default=False,
52  required=False)
53 
54 
55  args = parser.parse_args()
56 
57  logger.debug('args:')
58 
59  logger.debug(args)
60 
61 
62  from AthenaConfiguration.AllConfigFlags import initConfigFlags
63  flags = initConfigFlags()
64 
65  if(args.nevent > 0):
66  flags.Exec.MaxEvents = args.nevent
67 
68  #flags.Common.isOnline = not flags.Input.isMC
69  flags.Concurrency.NumThreads = 1
70  flags.Concurrency.NumConcurrentEvents = 1
71  flags.Trigger.doLVL1 = True
72 
73 
74  flags.Concurrency.NumThreads = 1
75  flags.Concurrency.NumConcurrentEvents = 1
76 
77  flags.GeoModel.AtlasVersion="ATLAS-R3S-2021-03-01-00"
78 
79  flags.Scheduler.ShowDataDeps = True
80  flags.Scheduler.CheckDependencies = True
81  flags.Scheduler.ShowDataFlow = True
82  flags.Trigger.EDMVersion = 3
83  flags.Trigger.doLVL1 = True
84  flags.Trigger.enableL1CaloPhase1 = True
85 
86 
87  flags.lock()
88  flags.dump()
89 
90  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
91  acc = MainServicesCfg(flags)
92 
93 
94  testBench_alg = CompFactory.GlobalSim.InvMassDPhiInc2TestBenchAlg(
95  "invMassDPhiInc2BenchAlg")
96 
97  base_data = "/eos/atlas/atlascerngroupdisk/data-art/"\
98  "large-input/trig-val/GlobalSimTest/invMassDphiInc2/"
99 
100  # an example input file name of test vectors
101 
102 
103  # run from file.
104  # testBench_alg.testsFileName=os.path.join(base_data, 'tests_00.dat')
105 
106  exp_mults_data = os.path.join(base_data, 'expectedResults_00.dat')
107  testBench_alg.expectedResults_FileName = exp_mults_data
108 
109  # values for manual testing.
110  # manual testing is active if no input file name is given
111  testBench_alg.test_tobs1 = ['00000000000000000000000000000000',
112  '00000000000000000000000000000001']
113  testBench_alg.test_tobs2 = ['00000000000000000000000000000010',
114  '10000000000000000000000000000011']
115 
116  acc.addEventAlgo(testBench_alg)
117  from AthenaCommon.Constants import DEBUG
118 
119  testBench_alg.OutputLevel = DEBUG
120 
121  from GlobalSimAlgCfg_invMassDPhiInc2 import GlobalSimulationAlgCfg
122  acc.merge(GlobalSimulationAlgCfg(flags))
123 
124  if acc.run().isFailure():
125  import sys
126  sys.exit(1)
127 
128 
GlobalSimAlgCfg_Egamma1Baseline.GlobalSimulationAlgCfg
def GlobalSimulationAlgCfg(flags, name="GlobalSimEgamma1Baseline", OutputLevel=DEBUG, dump=False)
Definition: GlobalSimAlgCfg_Egamma1Baseline.py:10
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:312
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567