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

Public Member Functions

def initialize (self)
 
def event (self)
 

Detailed Description

Returns 1 if current event contains at least one K_L^0, 0 otherwise

Definition at line 27 of file triggerKLs.py.

Member Function Documentation

◆ event()

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

Definition at line 36 of file triggerKLs.py.

36 def event(self):
37 """reimplementation of Module::event()."""
38
39 self.return_value(0)
40 mcparticles = Belle2.PyStoreArray('MCParticles')
41 for p in mcparticles:
42 if abs(p.getPDG()) == 130:
43 b2.B2INFO('found a K_L!')
44 self.return_value(1)
45
46 # also select the object in the display
47 displayData = Belle2.PyStoreObj("DisplayData")
48 displayData.create()
49 displayData.obj().select(p)
50 break
51
52
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 31 of file triggerKLs.py.

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

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