4 from ROOT
import Belle2
8 """An example of a basf2 module in python which accesses things in the datastore."""
11 """Create a member to access event info and the MCParticles
20 """Print the number of charged particles and the total charge"""
24 charge = particle.getCharge()
27 total_charge += charge
30 f
"Number of charged particles = {n_charged}, "
31 f
"total charge of event = {total_charge}"
39 main.add_module(
"EventInfoSetter", evtNumList=[10])
42 main.add_module(
"ParticleGun", nTracks=3)
eventinfo
an example object from the datastore (the metadata collection for the event)
particles
an example array from the datastore (the list of MC particles)
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.