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

Public Member Functions

def initialize (self)
 
def event (self)
 

Detailed Description

Test DisplayData

Definition at line 20 of file displaydata.py.

Member Function Documentation

◆ event()

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

Definition at line 28 of file displaydata.py.

28 def event(self):
29 """reimplementation of Module::event()."""
30
31 displayData = Belle2.PyStoreObj("DisplayData")
32 displayData.create()
33
34 # you can put a label at arbitrary points
35 displayData.obj().addLabel("Origin", XYZVector(0, 0, 0))
36
37 # or simple points (grouped into sets)
38 for i in range(10):
39 displayData.obj().addPoint("set 1", XYZVector(15, 15, 10 * i))
40 for i in range(10):
41 displayData.obj().addPoint("set 2", XYZVector(10 * i, 0, 50))
42
43 # you can add arrows
44 pos = XYZVector(0, 0, 100)
45 displayData.obj().addArrow("x", pos, pos + XYZVector(50, 0, 0))
46 displayData.obj().addArrow("y", pos, pos + XYZVector(0, 50, 0))
47 displayData.obj().addArrow("z", pos, pos + XYZVector(0, 0, 50))
48
49 displayData.obj().addArrow("z=-2m", XYZVector(100, 100, -200), XYZVector(0, 0, -200), ROOT.kGray)
50
51 # highlight the first MCParticle
52 mcparticles = Belle2.PyStoreArray('MCParticles')
53 part = mcparticles[0]
54 if part is not None:
55 displayData.obj().select(part)
56
57
58# register necessary modules
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

◆ initialize()

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

Definition at line 23 of file displaydata.py.

23 def initialize(self):
24 """reimplementation of Module::initialize()."""
25
26 Belle2.PyStoreObj("DisplayData").registerInDataStore()
27

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