Text this: Simulation of injection and capture of beam electrons in small-size betatrons by the method of macroparticles