Belle II Software development
VisualizeVertex Class Reference
Inheritance diagram for VisualizeVertex:

Public Member Functions

def initialize (self)
 
def event (self)
 

Detailed Description

Visualize the vertex configured for the ParticleGun

Definition at line 30 of file pgun_vertex.py.

Member Function Documentation

◆ event()

def event (   self)
reimplementation of Module::event().

Definition at line 38 of file pgun_vertex.py.

38 def event(self):
39 """reimplementation of Module::event()."""
40
41 displayData = Belle2.PyStoreObj("DisplayData")
42 displayData.create()
43
44 displayData.obj().addLabel("Origin", XYZVector(0, 0, 0))
45 displayData.obj().addLabel("0,0,10", XYZVector(0, 0, 10))
46
47 # visualize extent of vertex
48 global vertexparams
49 displayData.obj().addPoint("Vertex", XYZVector(vertexparams[0][0],
50 vertexparams[1][0],
51 vertexparams[2][0]))
52 for d in range(3):
53 sigma = vertexparams[d][1]
54 # add points at +-sigma on both sides of Vertex
55 vertexparams[d][0] -= sigma
56 displayData.obj().addPoint("Width", XYZVector(vertexparams[0][0],
57 vertexparams[1][0],
58 vertexparams[2][0]))
59 vertexparams[d][0] += 2 * sigma
60 displayData.obj().addPoint("Width", XYZVector(vertexparams[0][0],
61 vertexparams[1][0],
62 vertexparams[2][0]))
63 vertexparams[d][0] -= sigma
64
65
66# register necessary modules
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

◆ initialize()

def initialize (   self)
reimplementation of Module::initialize().

Definition at line 33 of file pgun_vertex.py.

33 def initialize(self):
34 """reimplementation of Module::initialize()."""
35
36 Belle2.PyStoreObj("DisplayData").registerInDataStore()
37

The documentation for this class was generated from the following file: