InjectParts#
- class orbit.injection.InjectParts(nparts, bunch, lostbunch, injectregion, xDistFunc, yDistFunc, lDistFunc, nmaxmacroparticles=- 1)[source]#
Bases:
objectThis routine injects particles into a bunch with user specified distribution functions.
Methods Summary
addInjectedParticle(bunch, x, px, y, py, z, ...)This method adds the injected particle to the bunch.
addLostParticle(bunch, lostbunch, x, px, y, ...)This method adds the lost particle to the lost particles bunch.
Performs injections.
setnparts(nparts)Sets the number of partcicles that will be injected.
Methods Documentation
- addInjectedParticle(bunch, x, px, y, py, z, dE, particleId)[source]#
This method adds the injected particle to the bunch. It also will check if bunch has ParticleIdNumber attribute, in this case, an added particle will be assigned this Id. If bunch has InitailCoords attributes they will be assigned as well.
- addLostParticle(bunch, lostbunch, x, px, y, py, z, dE)[source]#
This method adds the lost particle to the lost particles bunch. It also will check if lost bunch has ParticleIdNumber attribute, in this case, an added particle will be assigned Id = -1 . If bunch has InitailCoords attributes they will be assigned as well.