11 from ROOT
import Belle2
12 from ROOT
import TVector3
22 vertexparams = [[0, 1], [0, 1], [10, 2]]
26 """Visualize the vertex configured for the ParticleGun"""
29 """reimplementation of Module::initialize()."""
34 """reimplementation of Module::event()."""
39 displayData.obj().addLabel(
"Origin", TVector3(0, 0, 0))
40 displayData.obj().addLabel(
"0,0,10", TVector3(0, 0, 10))
44 displayData.obj().addPoint(
"Vertex", TVector3(vertexparams[0][0],
48 sigma = vertexparams[d][1]
50 vertexparams[d][0] -= sigma
51 displayData.obj().addPoint(
"Width", TVector3(vertexparams[0][0],
54 vertexparams[d][0] += 2 * sigma
55 displayData.obj().addPoint(
"Width", TVector3(vertexparams[0][0],
58 vertexparams[d][0] -= sigma
62 eventinfosetter = register_module(
'EventInfoSetter')
63 eventinfosetter.param(
'evtNumList', [500])
67 gearbox = register_module(
'Gearbox')
68 geometry = register_module(
'Geometry')
69 geometry.param(
'components', [
'CDC',
'MagneticField'])
71 particlegun = register_module(
'ParticleGun')
73 particlegun.param(
'vertexGeneration',
'normal')
75 particlegun.param(
'xVertexParams', vertexparams[0])
76 particlegun.param(
'yVertexParams', vertexparams[1])
77 particlegun.param(
'zVertexParams', vertexparams[2])
80 g4sim = register_module(
'FullSim')
82 g4sim.logging.log_level = LogLevel.ERROR
88 main.add_module(eventinfosetter)
90 main.add_module(gearbox)
91 main.add_module(geometry)
92 main.add_module(particlegun)
98 display = register_module(
'Display')
99 display.param(
'showAllPrimaries',
True)
100 main.add_module(display)