Belle II Software  release-05-02-19
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 9 of file best_candidate_selection.py.

Member Function Documentation

◆ event()

def event (   self)
And then we generate particles

Definition at line 20 of file best_candidate_selection.py.

20  def event(self):
21  """And then we generate particles"""
22  print("New event:")
23  for i in range(10):
24  p = self.mcp.appendNew()
25  p.setPDG(11)
26  p.setMassFromPDG()
27  p.setMomentum(random.randrange(1, 5), random.randrange(1, 5), random.randrange(1, 5))
28 
29  p = self.mcp.appendNew()
30  p.setPDG(11)
31  p.setMassFromPDG()
32  p.setMomentum(math.nan, math.nan, math.nan)
33 
34 

◆ initialize()

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

Definition at line 14 of file best_candidate_selection.py.


The documentation for this class was generated from the following file:
ClusterEfficiency.ClusterEfficiency.event
def event(self)
Definition: ClusterEfficiency.py:146