Belle II Software  light-2403-persian
LCASaverModule Class Reference
Inheritance diagram for LCASaverModule:
Collaboration diagram for LCASaverModule:

Public Member Functions

def __init__ (self, particle_lists, features, mcparticle_list, output_file)
 
def initialize (self)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 particle_lists
 Input particle lists.
 
 features
 Features to save.
 
 mcparticle_list
 MC particle list (Upsilon, B0, B+)
 
 output_file
 Output file name.
 
 max_particles
 Max number of particles It doesn't actually matter what this is as long as it's bigger than the number of particles in any events we'll encounter. More...
 
 eventinfo
 Event info.
 
 root_outfile
 ROOT output file.
 
 tree
 ROOT tree.
 
 event_num
 Event number.
 
 isB
 bool containing information whether we reconstruct B or Upsilon
 
 truth_dict
 Truth information.
 
 n_particles
 Number of particles.
 
 primary
 Particle-is-primary flag.
 
 leaves
 Leaves in event.
 
 b_index
 B index.
 
 feat_dict
 Features dictionary.
 
 mc_pdg
 True MC PDG.
 

Private Member Functions

def _reset_LCA (self)
 

Detailed Description

Save Lowest Common Ancestor matrix of each MC Particle in the given list.

Args:
    particle_lists (list): Name of particle lists to save features of.
    features (list): List of features to save for each particle.
    mcparticle_list (str): Name of particle list to build LCAs from (will use as root).
    output_file (str): Path to output file to save.

Definition at line 205 of file LCASaverModule.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  particle_lists,
  features,
  mcparticle_list,
  output_file 
)
Initialization.

Definition at line 216 of file LCASaverModule.py.

222  ):
223  """
224  Initialization.
225  """
226  super().__init__()
227 
228  self.particle_lists = particle_lists
229 
230  self.features = features
231 
232  self.mcparticle_list = mcparticle_list
233 
234  self.output_file = output_file
235 
236 
239  self.max_particles = 500
240 

Member Function Documentation

◆ _reset_LCA()

def _reset_LCA (   self)
private
Resets the value of the LCA to 0.

Definition at line 320 of file LCASaverModule.py.

◆ event()

def event (   self)
Called for each event.

Definition at line 330 of file LCASaverModule.py.

◆ initialize()

def initialize (   self)
Called once at the beginning.

Definition at line 241 of file LCASaverModule.py.

◆ terminate()

def terminate (   self)
Called at the end.

Definition at line 455 of file LCASaverModule.py.

Member Data Documentation

◆ max_particles

max_particles

Max number of particles It doesn't actually matter what this is as long as it's bigger than the number of particles in any events we'll encounter.

ROOT won't save all entries.

Definition at line 239 of file LCASaverModule.py.


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