Belle II Software light-2406-ragdoll
Generator Class Reference
Inheritance diagram for Generator:
Collaboration diagram for Generator:

Public Member Functions

def initialize (self)
 
def event (self)
 

Public Attributes

 mcp
 MCParticle array.
 

Detailed Description

Generate a list of 10 electrons which have stupid momenta just to sort
them later. And then add one electron where all momentum components are
nan

Definition at line 16 of file best_candidate_selection.py.

Member Function Documentation

◆ event()

def event (   self)
And then we generate particles, ensuring some overlap in the momenta.

Definition at line 27 of file best_candidate_selection.py.

27 def event(self):
28 """And then we generate particles, ensuring some overlap in the momenta."""
29 print("New event:")
30 for _ in range(5):
31 px, py, pz = random.randrange(1, 5), random.randrange(1, 5), random.randrange(1, 5)
32 for _ in range(2):
33 p = self.mcp.appendNew()
34 p.setPDG(11)
35 p.setMassFromPDG()
36 p.setMomentum(px, py, pz)
37
38 p = self.mcp.appendNew()
39 p.setPDG(11)
40 p.setMassFromPDG()
41 p.setMomentum(math.nan, math.nan, math.nan)
42
43

◆ initialize()

def initialize (   self)
We need to register the mc particles

Definition at line 21 of file best_candidate_selection.py.

21 def initialize(self):
22 """We need to register the mc particles"""
23
24 self.mcp = Belle2.PyStoreArray("MCParticles")
25 self.mcp.registerInDataStore()
26
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72

Member Data Documentation

◆ mcp

mcp

MCParticle array.

Definition at line 24 of file best_candidate_selection.py.


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