Belle II Software  release-08-01-10
DisplayDataTest Class Reference
Inheritance diagram for DisplayDataTest:
Collaboration diagram for DisplayDataTest:

Public Member Functions

def initialize (self)
 
def event (self)
 

Detailed Description

Test DisplayData

Definition at line 21 of file displaydata.py.

Member Function Documentation

◆ event()

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

Definition at line 29 of file displaydata.py.

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


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