13 b2.logging.log_level = b2.LogLevel.WARNING
17 os.environ[
'G4VRMLFILE_VIEWER'] =
'freewrl'
19 eventinfosetter = b2.register_module(
'EventInfoSetter')
21 paramloader = b2.register_module(
'Gearbox')
23 paramloader.param(
'fileName',
'/geometry/Beast2_phase1.xml')
27 geobuilder = b2.register_module(
'Geometry')
28 geobuilder.log_level = b2.LogLevel.INFO
29 pguninput = b2.register_module(
'ParticleGun')
30 g4sim = b2.register_module(
'FullSim')
32 eventinfosetter.param(
'evtNumList', [1])
34 g4sim.param(
'EnableVisualization',
True)
35 g4sim.param(
'UICommandsAtIdle', [
'/vis/open VRML2FILE',
'/vis/drawVolume',
36 '/vis/scene/add/axes 0 0 0 31 mm',
37 '/vis/scene/add/trajectories smooth',
38 '/vis/modeling/trajectories/create/drawByCharge'])
48 pguninput.param(
'nTracks', 1)
49 pguninput.param(
'pdgCodes', [211])
50 pguninput.param(
'momentumParams', [2.0, 5.0])
51 pguninput.param(
'thetaParams', [85.0, 95.0])
52 pguninput.param(
'phiParams', [-5.0, 5.0])
54 main = b2.create_path()
56 main.add_module(eventinfosetter)
57 main.add_module(paramloader)
58 main.add_module(geobuilder)
60 main.add_module(pguninput)
61 main.add_module(g4sim)