16from ROOT
import Belle2
27vertexparams = [[0, 1], [0, 1], [10, 2]]
31 """Visualize the vertex configured for the ParticleGun"""
34 """reimplementation of Module::initialize()."""
39 """reimplementation of Module::event()."""
44 displayData.obj().addLabel(
"Origin", XYZVector(0, 0, 0))
45 displayData.obj().addLabel(
"0,0,10", XYZVector(0, 0, 10))
49 displayData.obj().addPoint(
"Vertex", XYZVector(vertexparams[0][0],
53 sigma = vertexparams[d][1]
55 vertexparams[d][0] -= sigma
56 displayData.obj().addPoint(
"Width", XYZVector(vertexparams[0][0],
59 vertexparams[d][0] += 2 * sigma
60 displayData.obj().addPoint(
"Width", XYZVector(vertexparams[0][0],
63 vertexparams[d][0] -= sigma
67eventinfosetter = b2.register_module(
'EventInfoSetter')
68eventinfosetter.param(
'evtNumList', [500])
72gearbox = b2.register_module(
'Gearbox')
73geometry = b2.register_module(
'Geometry')
75particlegun = b2.register_module(
'ParticleGun')
77particlegun.param(
'vertexGeneration',
'normal')
79particlegun.param(
'xVertexParams', vertexparams[0])
80particlegun.param(
'yVertexParams', vertexparams[1])
81particlegun.param(
'zVertexParams', vertexparams[2])
84g4sim = b2.register_module(
'FullSim')
86g4sim.logging.log_level = b2.LogLevel.ERROR
89main = b2.create_path()
92main.add_module(eventinfosetter)
94main.add_module(gearbox)
95main.add_module(geometry)
96main.add_module(particlegun)
102display = b2.register_module(
'Display')
103display.param(
'showAllPrimaries',
True)
104main.add_module(display)
a (simplified) python wrapper for StoreObjPtr.