17 from ROOT
import Belle2
28 vertexparams = [[0, 1], [0, 1], [10, 2]]
32 """Visualize the vertex configured for the ParticleGun"""
35 """reimplementation of Module::initialize()."""
40 """reimplementation of Module::event()."""
45 displayData.obj().addLabel(
"Origin", XYZVector(0, 0, 0))
46 displayData.obj().addLabel(
"0,0,10", XYZVector(0, 0, 10))
50 displayData.obj().addPoint(
"Vertex", XYZVector(vertexparams[0][0],
54 sigma = vertexparams[d][1]
56 vertexparams[d][0] -= sigma
57 displayData.obj().addPoint(
"Width", XYZVector(vertexparams[0][0],
60 vertexparams[d][0] += 2 * sigma
61 displayData.obj().addPoint(
"Width", XYZVector(vertexparams[0][0],
64 vertexparams[d][0] -= sigma
68 eventinfosetter = b2.register_module(
'EventInfoSetter')
69 eventinfosetter.param(
'evtNumList', [500])
73 gearbox = b2.register_module(
'Gearbox')
74 geometry = b2.register_module(
'Geometry')
76 particlegun = b2.register_module(
'ParticleGun')
78 particlegun.param(
'vertexGeneration',
'normal')
80 particlegun.param(
'xVertexParams', vertexparams[0])
81 particlegun.param(
'yVertexParams', vertexparams[1])
82 particlegun.param(
'zVertexParams', vertexparams[2])
85 g4sim = b2.register_module(
'FullSim')
87 g4sim.logging.log_level = b2.LogLevel.ERROR
90 main = b2.create_path()
93 main.add_module(eventinfosetter)
95 main.add_module(gearbox)
96 main.add_module(geometry)
97 main.add_module(particlegun)
103 display = b2.register_module(
'Display')
104 display.param(
'showAllPrimaries',
True)
105 main.add_module(display)
a (simplified) python wrapper for StoreObjPtr.