mpacts.particles. particlebase

In order to be able to use this module import it like this:

import mpacts.particles
#or assign it to a shorter name
import mpacts.particles as prt


class mpacts.particles.particlebase.ParticleBase(*args)

Bases: object

Base class from which all particles must derive

ParticleBase(name, parent, **kwargs)
add_connectivity(detector, connectivity, kwargslist=None, otherparticle=None)

Adding connectivity, note that otherparticle is assumed to be the pc2 in all cases for now!


To be overriden by the user to do usefull work when all parameters have been set of a particle (such as calculating mass, inertia ...)

classmethod combine(otherparticle)
classmethod create_docstring(level)

should be called by the user when he is done working with a particle so that checks can be done and after_init can be called.

classmethod initialize_pc(pc)
optional = 2
parts = []
required = 1
requires_offset_translation = 6
set_local_index = 5
set_parent_index = 4