ATLAS Offline Software
Loading...
Searching...
No Matches
python.TestBeamConfigFlags Namespace Reference

Functions

 createTestBeamConfigFlags ()
 testBeamRunArgsToFlags (runArgs, flags)

Function Documentation

◆ createTestBeamConfigFlags()

python.TestBeamConfigFlags.createTestBeamConfigFlags ( )

Definition at line 7 of file TestBeamConfigFlags.py.

7def createTestBeamConfigFlags():
8 tbcf = AthConfigFlags()
9 tbcf.addFlag("TestBeam.Eta", 'NONE')
10 tbcf.addFlag("TestBeam.Theta", 'NONE')
11 tbcf.addFlag("TestBeam.Phi", 'NONE')
12 tbcf.addFlag("TestBeam.Y", 'NONE')
13 tbcf.addFlag("TestBeam.Z", 'NONE')
14 tbcf.addFlag("TestBeam.Layout", 'tb_Tile2000_2003_5B')
15 # Test Beam beam properties
16 tbcf.addFlag("TestBeam.BeamPID", 11)
17 tbcf.addFlag("TestBeam.BeamEnergy", 100000) # Just use Beam.Energy?
18 tbcf.addFlag("TestBeam.Xbeam", -27500)
19 tbcf.addFlag("TestBeam.Ybeam", [-20,20])
20 tbcf.addFlag("TestBeam.Zbeam", [-15,15])
21 tbcf.addFlag("TestBeam.Tbeam", -27500)
22
23 return tbcf
24
25

◆ testBeamRunArgsToFlags()

python.TestBeamConfigFlags.testBeamRunArgsToFlags ( runArgs,
flags )

Definition at line 26 of file TestBeamConfigFlags.py.

26def testBeamRunArgsToFlags(runArgs, flags):
27 if hasattr(runArgs,"Eta") and ( hasattr(runArgs,"Theta") or hasattr(runArgs,"Z") ):
28 raise RuntimeError("Eta cannot be specified at the same time as Theta and Z.")
29
30 if hasattr(runArgs,"Eta"):
31 flags.TestBeam.Eta = runArgs.Eta
32
33 if hasattr(runArgs,"Theta") or hasattr(runArgs,"Z"):
34 if hasattr(runArgs,"Theta"):
35 flags.TestBeam.Theta = runArgs.Theta
36 else:
37 # Z specified on the commmand-line without Theta
38 flags.TestBeam.Theta=90
39
40 if hasattr(runArgs,"Z"):
41 flags.TestBeam.Z = runArgs.Z
42 else:
43 # Theta specified on the commmand-line without Z
44 flags.TestBeam.Z = 2550.0
45
46 if hasattr(runArgs,"Phi"):
47 flags.TestBeam.Phi=runArgs.Phi
48
49 if hasattr(runArgs,"Y"):
50 flags.TestBeam.Y=runArgs.Y